aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/evdev
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2021-01-14 19:48:53 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2021-01-14 20:04:47 +0000
commitb360682ac940a4cef1c922c33d685db24a67c96b (patch)
treee162c0edb11522182f46925ebbee9e2954ebedd7 /sys/dev/evdev
parentb62f6dfaed3d0189c1853f26b773c3afed203463 (diff)
downloadsrc-b360682ac940a4cef1c922c33d685db24a67c96b.tar.gz
src-b360682ac940a4cef1c922c33d685db24a67c96b.zip
Diffstat (limited to 'sys/dev/evdev')
-rw-r--r--sys/dev/evdev/cdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/evdev/cdev.c b/sys/dev/evdev/cdev.c
index ec60a12dbf2d..91536c119fb4 100644
--- a/sys/dev/evdev/cdev.c
+++ b/sys/dev/evdev/cdev.c
@@ -396,6 +396,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
struct evdev_dev *evdev = dev->si_drv1;
struct evdev_client *client;
struct input_keymap_entry *ke;
+ struct epoch_tracker et;
int ret, len, limit, type_num;
uint32_t code;
size_t nvalues;
@@ -415,7 +416,11 @@ evdev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
EVDEV_LOCK(evdev);
if (evdev->ev_kdb_active) {
evdev->ev_kdb_active = false;
+ if (evdev->ev_lock_type == EV_LOCK_EXT_EPOCH)
+ epoch_enter_preempt(INPUT_EPOCH, &et);
evdev_restore_after_kdb(evdev);
+ if (evdev->ev_lock_type == EV_LOCK_EXT_EPOCH)
+ epoch_exit_preempt(INPUT_EPOCH, &et);
}
EVDEV_UNLOCK(evdev);
}