mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremy Dean Clifton <deaner92@yahoo.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Heitor Alves de Siqueira <halves@igalia.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hillf Danton <hdanton@sina.com>,
	syzbot+5897b3c764f5989ea942@syzkaller.appspotmail.com
Subject: Re: [PATCH] Bluetooth: hci_core: Fix queuing disc_work while workqueue is drained
Date: Wed, 28 Oct 2026 14:26:31 +0000	[thread overview]
Message-ID: <20261028142631.128802-1-deaner92@yahoo.com> (raw)
In-Reply-To: <20261020145320.115333-1-deaner92@yahoo.com>

Hi Luiz,
 
Sashiko replied with two points and they are valid:
 
1. A disc_work timer armed before close sets the flag can still fire
   during drain_workqueue() and hit the same warning.

   hci_dev_close_sync(), after setting the flag and
   synchronize_rcu(), we could cancel each connection's pending delayed works
   (disc_work, idle_work, auto_accept_work, le_conn_timeout) before
   drain_workqueue(). 
 
2. Skipping disc_work can leak a connection created after
   hci_conn_hash_flush(). This one is more severe.
   Suggested fix: re-check HCI_UP after hci_dev_lock() on the connect
   path, so no connection can be created once close has cleared
   HCI_UP.

   Are these additional changes reasonable? Any feedback is welcome.


Jeremy

      reply	other threads:[~2026-10-28 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261020145320.115333-1-deaner92.ref@yahoo.com>
2026-10-20 14:53 ` Jeremy Dean Clifton
2026-10-28 14:26   ` Jeremy Dean Clifton [this message]

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=20261028142631.128802-1-deaner92@yahoo.com \
    --to=deaner92@yahoo.com \
    --cc=halves@igalia.com \
    --cc=hdanton@sina.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=syzbot+5897b3c764f5989ea942@syzkaller.appspotmail.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®