From: Arnd Bergmann <arnd@arndb.de>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org,
Arnd Bergmann <arndb@de.ibm.com>
Subject: [PATCH 1/8] spufs: fix module refcount race
Date: Fri, 09 Dec 2005 19:04:15 +0100 [thread overview]
Message-ID: <20051209182053.486222000@localhost> (raw)
In-Reply-To: 20051209180414.872465000@localhost
[-- Attachment #1: spufs-modcount-fix.diff --]
[-- Type: text/plain, Size: 806 bytes --]
One of the two users of spufs_calls.owner still has a race
when calling try_module_get while the module is removed.
This makes it use the correct instance of owner.
Noticed by Milton Miller.
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Index: linux-2.6.15-rc/arch/powerpc/platforms/cell/spu_syscalls.c
===================================================================
--- linux-2.6.15-rc.orig/arch/powerpc/platforms/cell/spu_syscalls.c
+++ linux-2.6.15-rc/arch/powerpc/platforms/cell/spu_syscalls.c
@@ -40,7 +40,7 @@ asmlinkage long sys_spu_create(const cha
struct module *owner = spufs_calls.owner;
ret = -ENOSYS;
- if (owner && try_module_get(spufs_calls.owner)) {
+ if (owner && try_module_get(owner)) {
ret = spufs_calls.create_thread(name, flags, mode);
module_put(owner);
}
--
next prev parent reply other threads:[~2005-12-09 18:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-09 18:04 [PATCH 0/8] Re: Cell updates for powerpc.git Arnd Bergmann
2005-12-09 18:04 ` Arnd Bergmann [this message]
2005-12-09 18:04 ` [PATCH 2/8] spufs: trivial compile fix Arnd Bergmann
2005-12-09 18:04 ` [PATCH 3/8] spufs: fix hexdump format Arnd Bergmann
2005-12-09 18:04 ` [PATCH 4/8] spufs: clear dsisr on CLASS1[Mf] exception Arnd Bergmann
2005-12-09 18:04 ` [PATCH 5/8] cell: enable pause(0) in cpu_idle Arnd Bergmann
2005-12-09 18:04 ` [PATCH 6/8] cell: add iommu support for larger memory Arnd Bergmann
2005-12-09 18:04 ` [PATCH 7/8] cell: disable legacy i/o area Arnd Bergmann
2005-12-09 18:21 ` [PATCH 8/8] powerpc: fix large nvram access Arnd Bergmann
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=20051209182053.486222000@localhost \
--to=arnd@arndb.de \
--cc=arndb@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=paulus@samba.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