“78add057afffc73a2f8152988c079bf441407499”上不存在“paddle/git@gitcode.net:paddlepaddle/Paddle.git”
提交 d6d79a78 编写于 作者: J Jiri Pirko 提交者: Dmitry Torokhov

Input: atkbd - cancel delayed work before freeing its structure

Pointed out by Oleg Nesterov. Since delayed work is used here, use of
flush_scheduled_work() is not sufficient in atkbd_disconnect(). It does
not wait for scheduled delayed work to finish. This patch prevents
delayed work to be processed after freeing atkbd structure (used struct
delayed_work is part of atkbd) by cancelling this delayed work.
Signed-off-by: NJiri Pirko <jpirko@redhat.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 a8215b81
......@@ -824,7 +824,7 @@ static void atkbd_disconnect(struct serio *serio)
atkbd_disable(atkbd);
/* make sure we don't have a command in flight */
flush_scheduled_work();
cancel_delayed_work_sync(&atkbd->event_work);
sysfs_remove_group(&serio->dev.kobj, &atkbd_attribute_group);
input_unregister_device(atkbd->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册