Re: [PATCH] HID: hidraw: fix data race on device refcount

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

 



On Wed, 21 Jun 2023 13:17:43 +0200, Ludvig Michaelsson wrote:
> The hidraw_open() function increments the hidraw device reference
> counter. The counter has no dedicated synchronization mechanism,
> resulting in a potential data race when concurrently opening a device.
> 
> The race is a regression introduced by commit 8590222e4b02 ("HID:
> hidraw: Replace hidraw device table mutex with a rwsem"). While
> minors_rwsem is intended to protect the hidraw_table itself, by instead
> acquiring the lock for writing, the reference counter is also protected.
> This is symmetrical to hidraw_release().
> 
> [...]

Added stable@ cc tags and

Applied to hid/hid.git (for-6.4/upstream-fixes), thanks!

[1/1] HID: hidraw: fix data race on device refcount
      https://git.kernel.org/hid/hid/c/944ee77dc6ec

Cheers,
-- 
Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>




[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