From: "PaX Team" <pageexec@freemail.hu>
To: linux-kernel@vger.kernel.org, rogelio.serrano@gmail.com
Subject: Re: atomic_inc and spin_lock_irq
Date: Tue, 23 Dec 2014 03:08:10 +0100 [thread overview]
Message-ID: <5498CE8A.26946.7AAE3D1@pageexec.freemail.hu> (raw)
In-Reply-To: <CAB_-8bLk-HVWB6Mmt=rjDguou1kbGQ9c7o5nQxV3zAg+Txf7GQ@mail.gmail.com>
On 18 Dec 2014 at 21:07, Rogelio M. Serrano Jr. wrote:
> whats the difference between:
>
> atomic_inc(&port->count);
>
> and
>
> spin_lock_irq(&port->lock);
> ++port->count;
> spin_unlock_irq(&port->lock);
in PaX this kind of change brings the ->count accesses under the coverage
of the REFCOUNT feature. if the kernel had a non-atomic refcount type and
corresponding accessors, they'd be used here instead.
prev parent reply other threads:[~2014-12-23 2:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 21:07 Rogelio M. Serrano Jr.
2014-12-18 22:04 ` Mihai Donțu
2014-12-23 2:08 ` PaX Team [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5498CE8A.26946.7AAE3D1@pageexec.freemail.hu \
--to=pageexec@freemail.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=rogelio.serrano@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®