diff options
author | Yonghua Zheng <younghua.zheng@gmail.com> | 2013-08-26 23:38:35 +0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-08-26 21:40:24 +0200 |
commit | 277fe44dd862412ee034470ad1c13a79d24e533b (patch) | |
tree | 7333fed46331fc756cfde7dfd58a1127de97955b /drivers/hid/uhid.c | |
parent | 06bb5219118fb098f4b0c7dcb484b28a52bf1c14 (diff) | |
download | op-kernel-dev-277fe44dd862412ee034470ad1c13a79d24e533b.zip op-kernel-dev-277fe44dd862412ee034470ad1c13a79d24e533b.tar.gz |
HID: hidraw: Add spinlock in struct hidraw to protect list
It is unsafe to call list_for_each_entry in hidraw_report_event to
traverse each hidraw_list node without a lock protection, the list
could be modified if someone calls hidraw_release and list_del to
remove itself from the list, this can cause hidraw_report_event
to touch a deleted list struct and panic.
To prevent this, introduce a spinlock in struct hidraw to protect
list from concurrent access.
Signed-off-by: Yonghua Zheng <younghua.zheng@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/uhid.c')
0 files changed, 0 insertions, 0 deletions