HID: protect hid_debug_list
Accesses to hid_device->hid_debug_list are not serialized properly, which could result in SMP concurrency issues when HID debugfs events are accessesed by multiple userspace processess. Serialize all the list operations by a mutex. Spotted by Al Viro. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
@@ -512,6 +512,7 @@ struct hid_device { /* device report descriptor */
|
||||
struct dentry *debug_rdesc;
|
||||
struct dentry *debug_events;
|
||||
struct list_head debug_list;
|
||||
struct mutex debug_list_lock;
|
||||
wait_queue_head_t debug_wait;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user