diff options
| author | Max Asbock <[email protected]> | 2005-06-22 00:16:36 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2005-06-22 02:07:35 +0000 |
| commit | 8818760512424f60ad9fafb7a087b007a9274eb3 (patch) | |
| tree | fb49ce398750f42803d4631a24e4a2ffe35d79d7 /drivers/misc/ibmasm/ibmasmfs.c | |
| parent | [PATCH] ibmasm driver: redesign handling of remote control events (diff) | |
| download | kernel-8818760512424f60ad9fafb7a087b007a9274eb3.tar.gz kernel-8818760512424f60ad9fafb7a087b007a9274eb3.zip | |
[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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
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 if (command_data->command) return -EAGAIN; - cmd = ibmasm_new_command(count); + cmd = ibmasm_new_command(command_data->sp, count); if (!cmd) return -ENOMEM; |
