* [PATCH BlueZ] input: Fix not removing security watch when disconnecting
@ 2019-07-24 11:01 Luiz Augusto von Dentz
0 siblings, 0 replies; only message in thread
From: Luiz Augusto von Dentz @ 2019-07-24 11:01 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-24 11:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 11:01 [PATCH BlueZ] input: Fix not removing security watch when disconnecting Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).