--- y/drivers/input/input.c +++ n/drivers/input/input.c @@ -781,9 +781,8 @@ static void input_disconnect_device(stru * not to protect access to dev->going_away but rather to ensure * that there are no threads in the middle of input_open_device() */ - mutex_lock(&dev->mutex); dev->going_away = true; - mutex_unlock(&dev->mutex); + synchronize_rcu(); spin_lock_irq(&dev->event_lock);