[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <168736288418.3423010.16497710719241305762.b4-ty@redhat.com>
Date: Wed, 21 Jun 2023 17:55:14 +0200
From: Benjamin Tissoires <benjamin.tissoires@...hat.com>
To: Jiri Kosina <jikos@...nel.org>,
André Almeida <andrealmeid@...lia.com>,
Ludvig Michaelsson <ludvig.michaelsson@...ico.com>
Cc: Benjamin Tissoires <benjamin.tissoires@...hat.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: hidraw: fix data race on device refcount
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@...hat.com>
Powered by blists - more mailing lists