Skip to content
Commit 66d2a595 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Input: keyboard - fix lack of locking when traversing handler->h_list



Keyboard handler should not attempt to traverse handler->h_list on
its own, without any locking, otherwise it races with registering
and unregistering of input handles which leads to crashes.

Introduce input_handler_for_each_handle() helper that allows safely
iterate over all handles attached to a particular handler and switch
keyboard handler to use it.

Reported-by: default avatarJim Paradis <jparadis@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 6ee88d71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment