From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If interrupt channels disconnects the security watch would be left dangling as the channel is being shutdown which can cause some bugs: https://bugzilla.kernel.org/show_bug.cgi?id=204275 --- profiles/input/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/profiles/input/device.c b/profiles/input/device.c index a711ef527..32c682b79 100644 --- a/profiles/input/device.c +++ b/profiles/input/device.c @@ -327,6 +327,11 @@ static gboolean intr_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data idev->intr_io = NULL; } + if (idev->sec_watch > 0) { + g_source_remove(idev->sec_watch); + idev->sec_watch = 0; + } + /* Close control channel */ if (idev->ctrl_io && !(cond & G_IO_NVAL)) g_io_channel_shutdown(idev->ctrl_io, TRUE, NULL); -- 2.21.0