From: Zhengping Jiang <jiangzp@google.com>
To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org,
luiz.dentz@gmail.com
Cc: mmandlik@google.com, chromeos-bluetooth-upstreaming@chromium.org,
Zhengping Jiang <jiangzp@google.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [kernel PATCH v2 0/1] Clear workqueue to avoid use-after-free
Date: Fri, 24 Feb 2023 11:53:12 -0800 [thread overview]
Message-ID: <20230224195313.1877313-1-jiangzp@google.com> (raw)
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
next reply other threads:[~2023-02-24 19:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 19:53 Zhengping Jiang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230224195313.1877313-1-jiangzp@google.com \
--to=jiangzp@google.com \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johan.hedberg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=mmandlik@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®