* HCI_EV_PHY_LINK_COMPLETE in net/bluetooth/hci_event.c
@ 2020-08-16 8:13 Fox Chen
0 siblings, 0 replies; only message in thread
From: Fox Chen @ 2020-08-16 8:13 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, David S. Miller, Jakub Kicinski,
linux-bluetooth, netdev, linux-kernel, Greg KH
Dear all,
I have a question about
static void hci_phy_link_complete_evt(struct hci_dev *hdev,
struct sk_buff *skb)
-- HCI_EV_PHY_LINK_COMPLETE event packet handler in hci_even.c:4940
if (ev->status) {
hci_conn_del(hcon); <--------------
hci_dev_unlock(hdev);
return;
}
Is it correct to del hcon here?? Because later on, when we close the
socket fd, socket_close will call sco_chan_del which will eventually
call hci_conn_drop. With hcon already deleted by this handler, it will
crash.
This bug is reported by syzbot in
https://syzkaller.appspot.com/bug?id=57e98513afbe427bbd65ac295130bcf5bc860dd8
I'm trying to fix that, but I don't know the design nature of
HCI_EV_PHY_LINK_COMPLETE. Will this scenario happen in real life?? Can
I remove hci_conn_del(hcon) here (I tested it, which fixes this bug)
??
Thanks,
Fox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-16 8:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16 8:13 HCI_EV_PHY_LINK_COMPLETE in net/bluetooth/hci_event.c Fox Chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.