From 21ed41da9ac62b60f527bef97143d91eb102427a Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Mon, 14 Jan 2019 18:23:05 +0100 Subject: [PATCH] usb_hid_drv: wait for keyboard LED registry in 'led_connect()' It can happen that a keyboard gets plugged in and 'led_connect()' is called while the keyboard LED of another keyboard is just being updated (and the registry is locked). Fixes #3118 --- repos/dde_linux/src/drivers/usb_hid/evdev.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repos/dde_linux/src/drivers/usb_hid/evdev.cc b/repos/dde_linux/src/drivers/usb_hid/evdev.cc index 621462a3f3..24aaa00f4b 100644 --- a/repos/dde_linux/src/drivers/usb_hid/evdev.cc +++ b/repos/dde_linux/src/drivers/usb_hid/evdev.cc @@ -422,6 +422,8 @@ static Genode::Constructible _led; static int led_connect(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id) { + _led->wait_for_registry(); + Keyboard_led *keyboard = new (Lx_kit::env().heap()) Keyboard_led(_registry, dev); _led->update(*keyboard);