diff options
author | Arnd Bergmann <arnd@arndb.de> | 2005-12-09 13:04:15 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:53:11 -0500 |
commit | 59d6d39f30f4460b7e6489831caf7fbfe371941a (patch) | |
tree | 10a8ba60af902f5236bc72f75c6e0f5f161d8a14 /arch | |
parent | a819f8ba76e81669fcc2665ac532cac650694b99 (diff) |
[PATCH] spufs: fix module refcount race
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/cell/spu_syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c index 91d564df944e..261b507a901a 100644 --- a/arch/powerpc/platforms/cell/spu_syscalls.c +++ b/arch/powerpc/platforms/cell/spu_syscalls.c | |||
@@ -40,7 +40,7 @@ asmlinkage long sys_spu_create(const char __user *name, | |||
40 | struct module *owner = spufs_calls.owner; | 40 | struct module *owner = spufs_calls.owner; |
41 | 41 | ||
42 | ret = -ENOSYS; | 42 | ret = -ENOSYS; |
43 | if (owner && try_module_get(spufs_calls.owner)) { | 43 | if (owner && try_module_get(owner)) { |
44 | ret = spufs_calls.create_thread(name, flags, mode); | 44 | ret = spufs_calls.create_thread(name, flags, mode); |
45 | module_put(owner); | 45 | module_put(owner); |
46 | } | 46 | } |