git: kernel/ums: Use evdev's private lock for ums
Peeter Must
peeterm at crater.dragonflybsd.org
Mon Apr 29 03:28:30 PDT 2019
commit a1d6eba4534e17f1123ced872b16124e89d36cf5
Author: Peeter Must <karu.pruun at gmail.com>
Date: Mon Apr 29 13:19:54 2019 +0300
kernel/ums: Use evdev's private lock for ums
* evdev can use either an internal or an external lock (the
parent driver's lock) to protect its private data in
evdev_dev. For ums evdev uses the ums (external) lock.
However, sometimes this leads to a panic when the usb
mouse is detached. This is because the ums may have cleaned
up its structures, including the lock, while the evdev is
still busy freeing its resources. If this happens, evdev
will panic since it cannot use the lock.
* The remedy is to make evdev use its private lock instead of
ums's lock. This is similar to how evdev and ukbd operate.
* A similar situation may occur for other drivers that we will
need to link to evdev.
* This change will make our ums/evdev deviate from FreeBSD.
Summary of changes:
sys/bus/u4b/input/ums.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a1d6eba4534e17f1123ced872b16124e89d36cf5
--
DragonFly BSD source repository
More information about the Commits
mailing list