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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 26 Aug 2013, Yonghua Zheng wrote:

> Hi Jiri,
> 
> Fix the conflict and update the patch:
> 
> >From 7c06e1f3a5959e73a5b827bda67e7c1eaed7da67 Mon Sep 17 00:00:00 2001
> From: Yonghua Zheng <younghua.zheng@xxxxxxxxx>
> 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 <younghua.zheng@xxxxxxxxx>

Applied now, thanks.

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux