[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>
This commit is contained in:
committed by
Linus Torvalds
parent
278d72ae88
commit
8818760512
@@ -321,7 +321,7 @@ static ssize_t command_file_write(struct file *file, const char __user *ubuff, s
|
||||
if (command_data->command)
|
||||
return -EAGAIN;
|
||||
|
||||
cmd = ibmasm_new_command(count);
|
||||
cmd = ibmasm_new_command(command_data->sp, count);
|
||||
if (!cmd)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Reference in New Issue
Block a user