From: Yonghua Zheng Date: Mon, 26 Aug 2013 15:38:35 +0000 (+0800) Subject: HID: hidraw: Add spinlock in struct hidraw to protect list X-Git-Tag: v3.12-rc1~125^2~1^7~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=277fe44dd862412ee034470ad1c13a79d24e533b;p=pandora-kernel.git 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 Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed