Thread (5 messages) 5 messages, 2 authors, 2013-08-26

Re: [PATCH 1/1] HID: hidraw: Add spinlock in struct hidraw to protect list

flat view

From: Jiri Kosina <hidden>
Date: 2013-08-26 19:44:10

On Mon, 26 Aug 2013, Yonghua Zheng wrote:
Hi Jiri,

Fix the conflict and update the patch:
quoted
From 7c06e1f3a5959e73a5b827bda67e7c1eaed7da67 Mon Sep 17 00:00:00 2001
From: Yonghua Zheng <redacted>
Date: Wed, 14 Aug 2013 17:43:36 +0800
Subject: [PATCH 1/1] HID: hidraw: Add spinlock in struct hidraw to protect
 member 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 <redacted>
Applied now, thanks.

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help