From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Fix a race in the vfp_notifier() function on SMP systems
Date: Fri, 18 Dec 2009 14:11:00 +0000 [thread overview]
Message-ID: <20091218141100.GA32481@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20091218134423.21279.93962.stgit@pc1117.cambridge.arm.com>
On Fri, Dec 18, 2009 at 01:45:09PM +0000, Catalin Marinas wrote:
> (patch updated following Russell's changes to vfpmodule.c)
>
> The vfp_notifier(THREAD_NOTIFY_RELEASE) maybe be called with thread->cpu
> different from the current one, causing a race condition with both the
> THREAD_NOTIFY_SWITCH path and vfp_support_entry().
How about we provide THREAD_NOTIFY_EXIT and call these hooks from
exit_thread() - we'll be calling the notifier when the thread is
still running, and so thread->cpu will be the local CPU.
This should be much safer all round, and give much simpler semantics
if we NULL out the current CPU's last_VFP_context pointer. It also
means that each CPUs last_VFP_context pointer is only ever accessed
from the local CPU, which can only be a good thing.
next prev parent reply other threads:[~2009-12-18 14:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 13:45 [PATCH] ARM: Fix a race in the vfp_notifier() function on SMP systems Catalin Marinas
2009-12-18 14:11 ` Russell King - ARM Linux [this message]
2009-12-18 14:22 ` [PATCH] ARM: Fix a race in the vfp_notifier() function on SMPsystems Catalin Marinas
2009-12-18 14:25 ` [PATCH] ARM: Fix a race in the vfp_notifier() function on SMP systems Russell King - ARM Linux
2009-12-18 14:47 ` Russell King - ARM Linux
2009-12-18 14:51 ` [PATCH] ARM: Fix a race in the vfp_notifier() function on SMPsystems Catalin Marinas
2009-12-18 14:53 ` Russell King - ARM Linux
2009-12-19 8:20 ` Dirk Behme
2009-12-22 15:36 ` Russell King - ARM Linux
2009-12-18 22:17 ` [PATCH] ARM: Fix a race in the vfp_notifier() function on SMP systems Ryan Mallon
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=20091218141100.GA32481@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).