Commit f53e1c9
committed
Bluetooth: MGMT: Fix possible crash on mgmt_index_removed
If mgmt_index_removed is called while there are commands queued on
cmd_sync it could lead to crashes like the bellow trace:
0x0000053D: __list_del_entry_valid_or_report+0x98/0xdc
0x0000053D: mgmt_pending_remove+0x18/0x58 [bluetooth]
0x0000053E: mgmt_remove_adv_monitor_complete+0x80/0x108 [bluetooth]
0x0000053E: hci_cmd_sync_work+0xbc/0x164 [bluetooth]
So while handling mgmt_index_removed this attempts to dequeue
commands passed as user_data to cmd_sync.
Fixes: 7cf5c29 ("Bluetooth: hci_sync: Refactor remove Adv Monitor")
Reported-by: jiaymao <quic_jiaymao@quicinc.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>1 parent d505d35 commit f53e1c9
1 file changed
+14
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
1456 | | - | |
1457 | | - | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1458 | 1462 | | |
1459 | | - | |
| 1463 | + | |
| 1464 | + | |
1460 | 1465 | | |
1461 | 1466 | | |
1462 | 1467 | | |
| |||
9394 | 9399 | | |
9395 | 9400 | | |
9396 | 9401 | | |
9397 | | - | |
| 9402 | + | |
9398 | 9403 | | |
9399 | 9404 | | |
9400 | 9405 | | |
9401 | 9406 | | |
9402 | | - | |
| 9407 | + | |
9403 | 9408 | | |
9404 | 9409 | | |
9405 | 9410 | | |
| |||
9450 | 9455 | | |
9451 | 9456 | | |
9452 | 9457 | | |
9453 | | - | |
| 9458 | + | |
9454 | 9459 | | |
9455 | 9460 | | |
9456 | 9461 | | |
| |||
9462 | 9467 | | |
9463 | 9468 | | |
9464 | 9469 | | |
9465 | | - | |
| 9470 | + | |
9466 | 9471 | | |
9467 | | - | |
| 9472 | + | |
9468 | 9473 | | |
9469 | | - | |
| 9474 | + | |
9470 | 9475 | | |
9471 | 9476 | | |
9472 | 9477 | | |
| |||
0 commit comments