]> git.baikalelectronics.ru Git - kernel.git/commit
Fix use-after-free oops in Bluetooth HID.
authorDavid Woodhouse <dwmw2@infradead.org>
Sat, 7 Jul 2007 18:58:39 +0000 (14:58 -0400)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 7 Jul 2007 19:22:37 +0000 (12:22 -0700)
commitf7b1831ea586b553b5f43dd57e2ecb9e754e336b
treec81d53cad2d1e4cd56f05c305340f9ba056fb801
parent5be8d9e9296e9dc9855c6a7416c3768ff4091b1a
Fix use-after-free oops in Bluetooth HID.

When cleaning up HIDP sessions, we currently close the ACL connection
before deregistering the input device. Closing the ACL connection
schedules a workqueue to remove the associated objects from sysfs, but
the input device still refers to them -- and if the workqueue happens to
run before the input device removal, the kernel will oops when trying to
look up PHYSDEVPATH for the removed input device.

Fix this by deregistering the input device before closing the
connections.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/bluetooth/hidp/core.c