]> git.baikalelectronics.ru Git - kernel.git/commit
HID: uhid: Use READ_ONCE()/WRITE_ONCE() for ->running
authorJann Horn <jannh@google.com>
Fri, 14 Jan 2022 13:33:31 +0000 (14:33 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 19 Jan 2022 14:59:05 +0000 (15:59 +0100)
commit72e9c1aa4ec6a8b6e839fdabed088219134957c2
tree3f1835897eb97677157348baaadc41e03295d1f2
parent7d60ede39a3fa50daf72c3101c79bd89de54f590
HID: uhid: Use READ_ONCE()/WRITE_ONCE() for ->running

The flag uhid->running can be set to false by uhid_device_add_worker()
without holding the uhid->devlock. Mark all reads/writes of the flag
that might race with READ_ONCE()/WRITE_ONCE() for clarity and
correctness.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/uhid.c