diff options
author | Max Asbock <masbock@us.ibm.com> | 2005-06-21 20:16:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:35 -0400 |
commit | 8818760512424f60ad9fafb7a087b007a9274eb3 (patch) | |
tree | fb49ce398750f42803d4631a24e4a2ffe35d79d7 /drivers/misc/ibmasm/ibmasmfs.c | |
parent | 278d72ae8803ffcd16070c95fe1d53f4466dc741 (diff) |
[PATCH] ibmasm driver: fix race in command refcount logic
This patch fixes a race in the command reference counting logic by putting
spinlocks around kobject_put() in the command_put function.
- Also added debug messages.
- Changed a memcpy to memcpy_fromio since we are reading from io space.
Signed-off-by: Max Asbock <masbock@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/misc/ibmasm/ibmasmfs.c')
-rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index ca839162e4f7..5c550fcac2c4 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c | |||
@@ -321,7 +321,7 @@ static ssize_t command_file_write(struct file *file, const char __user *ubuff, s | |||
321 | if (command_data->command) | 321 | if (command_data->command) |
322 | return -EAGAIN; | 322 | return -EAGAIN; |
323 | 323 | ||
324 | cmd = ibmasm_new_command(count); | 324 | cmd = ibmasm_new_command(command_data->sp, count); |
325 | if (!cmd) | 325 | if (!cmd) |
326 | return -ENOMEM; | 326 | return -ENOMEM; |
327 | 327 | ||