Skip to content

Bluetooth: 6LoWPAN lifecycle fixes

Cen Zhang linux-bluetooth lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Bluetooth: L2CAP: ignore close requests for deleted channelsnet/bluetooth/l2cap_core.c+4 -22 replies
2/5workqueue: add support for module-owned workinclude/linux/workqueue.h kernel/workqueue.c+58 -02 replies
3/5Bluetooth: L2CAP: drain channel timers on connection teardowninclude/net/bluetooth/l2cap.h net/bluetooth/l2cap_core.c+52 -51 reply
4/5Bluetooth: 6lowpan: handle channel setup failure and callback lifetimeinclude/net/bluetooth/l2cap.h net/bluetooth/6lowpan.c net/bluetooth/l2cap_core.c +2 more+148 -520 replies
5/5Bluetooth: 6lowpan: quiesce peers before channel deletionnet/bluetooth/6lowpan.c+33 -310 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Bluetooth: 6LoWPAN lifecycle fixes

6LoWPAN shares L2CAP channels between connection setup, published peers and packet transmission, while teardown also schedules asynchronous cleanup. These paths currently disagree on when channel ownership, peer visibility and module lifetime end. The resulting failures range from leaked or unusable connections and peers surviving disable to transmit use-after-free and execution of unloaded module code.

This series establishes a consistent ownership and teardown order across those paths. Shared L2CAP and workqueue changes provide the lifetime guarantees needed by the following 6LoWPAN changes, which make failed setup recoverable and stop users of a peer before releasing its resources. Keeping the changes together avoids fixing one lifetime while shortening another.

The timer support adds one ordered workqueue per L2CAP connection and serializes that connection's channel timers.

Assisted-by LLM