Bluetooth: Avoid rfcomm_session_timeout using freed session
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / bluetooth / rfcomm / core.c
index b23e2713fea829157959b80802671e79934e38d4..d301fbbe20982a660417d874982c96a79c01de00 100644 (file)
@@ -257,7 +257,7 @@ static void rfcomm_session_clear_timer(struct rfcomm_session *s)
 {
        BT_DBG("session %p state %ld", s, s->state);
 
-       if (del_timer(&s->timer))
+       if (del_timer_sync(&s->timer))
                rfcomm_session_put(s);
 }