aboutsummaryrefslogtreecommitdiff
path: root/kernel/locking/rtmutex-debug.h
diff options
context:
space:
mode:
author[email protected] <[email protected]>2020-01-15 20:46:28 +0300
committerJiri Kosina <[email protected]>2020-02-12 14:46:56 +0100
commit5c02c447eaeda29d3da121a2e17b97ccaf579b51 (patch)
tree02a1c1bedb8f91014706175750a496fddb508bfe /kernel/locking/rtmutex-debug.h
parent84a4062632462c4320704fcdf8e99e89e94c0aba (diff)
HID: hiddev: Fix race in in hiddev_disconnect()
Syzbot reports that "hiddev" is used after it's free in hiddev_disconnect(). The hiddev_disconnect() function sets "hiddev->exist = 0;" so hiddev_release() can free it as soon as we drop the "existancelock" lock. This patch moves the mutex_unlock(&hiddev->existancelock) until after we have finished using it. Reported-by: [email protected] Fixes: 7f77897ef2b6 ("HID: hiddev: fix potential use-after-free") Suggested-by: Alan Stern <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'kernel/locking/rtmutex-debug.h')
0 files changed, 0 insertions, 0 deletions