From: Arnd Bergmann <arnd@arndb.de>
To: Will Newton <will.newton@gmail.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>, stable@kernel.org
Subject: Re: [PATCH] bitops: Use volatile in generic atomic bitops.
Date: Wed, 27 Jul 2011 14:55:39 +0200 [thread overview]
Message-ID: <201107271455.39511.arnd@arndb.de> (raw)
In-Reply-To: <CAFbHwiQaYeQSwRykhKp57rQ8xLKSst9MXF7YJoQjEm0V+WN4Qw@mail.gmail.com>
On Wednesday 27 July 2011, Will Newton wrote:
> The generic atomic bitops currently explicitly cast away the
> volatile from the pointer passed to them. This will allow the
> access to the bitfield to happen outside of the critical section
> thus making the bitops no longer interrupt-safe. Remove this cast
> and add a volatile keyword to make sure all accesses to the
> bitfield happen inside the critical section.
>
> Signed-off-by: Will Newton <will.newton@imgtec.com>
Have you observed this behavior? The interrupt disable/enable should
always come with a barrier that should prevent the bitops from
leaking out, so I don't see how this causes problems in practice.
Arnd
next prev parent reply other threads:[~2011-07-27 12:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 12:21 [PATCH] bitops: Use volatile in generic atomic bitops Will Newton
2011-07-27 12:55 ` Arnd Bergmann [this message]
2011-07-27 13:09 ` Will Newton
2011-07-27 14:28 ` Arnd Bergmann
2011-07-27 14:32 ` Will Newton
2011-07-27 15:22 ` Arnd Bergmann
2011-07-27 15:59 ` Will Newton
2011-07-27 16:15 ` [stable] " Greg KH
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=201107271455.39511.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=will.newton@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.