mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
bnep_add_connection() reads the L2CAP connection without holding the
channel lock, then passes its HCI device to register_netdev(). Controller
teardown can clear and release that connection concurrently, leaving the
network device registration path to dereference a freed parent device.
Take a reference to the L2CAP connection while holding the channel lock.
Retain it until register_netdev() has taken the parent device reference.
Fixes:
|
||
|---|---|---|
| .. | ||
| bnep.h | ||
| core.c | ||
| Kconfig | ||
| Makefile | ||
| netdev.c | ||
| sock.c | ||