Bluetooth: l2cap: prevent deadlock on chan timeout

When getting a channel timeout, l2cap_chan_destroy is called from the
rtx_work work item.

In that function we attempted to cancel the current work item, and sync on
it being cancelled. The kernel API says that this will block until the work
item completes execution, hence a deadlock.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2 files changed