All of lore.kernel.org
 help / color / mirror / Atom feed
* [kernel PATCH v2 0/1] Clear workqueue to avoid use-after-free
@ 2023-02-24 19:53 Zhengping Jiang
  2023-02-24 19:53 ` [kernel PATCH v2 1/1] Bluetooth: hci_sync: clear workqueue before clear mgmt cmd Zhengping Jiang
  0 siblings, 1 reply; 13+ messages in thread
From: Zhengping Jiang @ 2023-02-24 19:53 UTC (permalink / raw)
  To: linux-bluetooth, marcel, luiz.dentz
  Cc: mmandlik, chromeos-bluetooth-upstreaming, Zhengping Jiang,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Johan Hedberg,
	Paolo Abeni, linux-kernel, netdev


After the hci_sync rework, cmd_sync_work was cleared when calling
hci_unregister_dev, but not when powering off the adapter.
Use-after-free errors happen when a work is still scheduled
when cmd is freed by __mgmt_power_off.

Changes in v2:
- Add function to clear the queue without stop the timer

Changes in v1:
- Clear cmd_sync_work queue before clearing the mgmt cmd list

Zhengping Jiang (1):
  Bluetooth: hci_sync: clear workqueue before clear mgmt cmd

 net/bluetooth/hci_sync.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

-- 
2.39.2.722.g9855ee24e9-goog


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-05-10  0:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24 19:53 [kernel PATCH v2 0/1] Clear workqueue to avoid use-after-free Zhengping Jiang
2023-02-24 19:53 ` [kernel PATCH v2 1/1] Bluetooth: hci_sync: clear workqueue before clear mgmt cmd Zhengping Jiang
2023-02-24 21:02   ` Luiz Augusto von Dentz
2023-02-24 22:37     ` Zhengping Jiang
2023-02-27  7:18       ` Zhengping Jiang
2023-02-27 23:41         ` Luiz Augusto von Dentz
2023-02-27 23:58           ` Zhengping Jiang
2023-02-28 21:11             ` Luiz Augusto von Dentz
2023-03-01  0:18               ` Zhengping Jiang
2023-03-01  1:53                 ` Luiz Augusto von Dentz
2023-03-01  2:11                   ` Zhengping Jiang
2023-05-09 23:13                     ` Zhengping Jiang
2023-05-10  0:00                       ` Luiz Augusto von Dentz

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.