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: NJim Paradis <jparadis@redhat.com> Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
Showing
想要评论请 注册 或 登录