diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index c92f31b997dd..65097d6ef9d8 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -1751,8 +1751,14 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err) sk->sk_err = err; if (parent) { + /* + * Keep the listener alive after unlinking the + * child. + */ + sock_hold(parent); bt_accept_unlink(sk); parent->sk_data_ready(parent); + sock_put(parent); } else { sk->sk_state_change(sk); }