All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Berg <bberg@redhat.com>
To: Oliver Neukum <oneukum@suse.com>,
	syzbot <syzbot+485cc00ea7cf41dfdbf1@syzkaller.appspotmail.com>,
	Thinh.Nguyen@synopsys.com, changbin.du@intel.com,
	christian.brauner@ubuntu.com, davem@davemloft.net,
	edumazet@google.com, gregkh@linuxfoundation.org,
	johan.hedberg@gmail.com, kuba@kernel.org,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, luiz.dentz@gmail.com,
	luiz.von.dentz@intel.com, marcel@holtmann.org,
	mathias.nyman@linux.intel.com, netdev@vger.kernel.org,
	stern@rowland.harvard.edu, syzkaller-bugs@googlegroups.com,
	yajun.deng@linux.dev
Subject: Re: [syzbot] BUG: sleeping function called from invalid context in hci_cmd_sync_cancel
Date: Thu, 09 Dec 2021 13:46:47 +0100	[thread overview]
Message-ID: <14584c1a1e449cc20b5af7918b411ee27cf1570b.camel@redhat.com> (raw)
In-Reply-To: <3e8cba55-5d34-eab3-0625-687b66bb9449@suse.com>

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

Hi,

On Thu, 2021-12-09 at 11:06 +0100, Oliver Neukum wrote:
> As __cancel_work_timer can be called from hci_cmd_sync_cancel() this is
> just not
> an approach you can take. It looks like asynchronously canceling the
> scheduled work
> would result in a race, so I would for now just revert.

Right, so this needs to be pushed into a workqueue instead, I suppose.

> What issue exactly is this trying to fix or improve?

The problem is aborting long-running synchronous operations. i.e.
without this patchset, USB enumeration will hang for 10s if a USB
bluetooth device disappears during firmware loading. This is because
even though the USB device is gone and all URB submissions fail, the
operation will only be aborted after the internal timeout happens.

The device in turn disappears because an rfkill switch is blocked and
the platform removes it from the bus. Overall, this can lead to
graphical login to hang as fprintd cannot initialise as it hangs in USB
enumeration.

Benjamin

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-12-09 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 20:36 [syzbot] BUG: sleeping function called from invalid context in hci_cmd_sync_cancel syzbot
2021-12-09  1:59 ` syzbot
2021-12-09 10:06   ` Oliver Neukum
2021-12-09 12:46     ` Benjamin Berg [this message]
2021-12-09 13:21       ` Oliver Neukum

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=14584c1a1e449cc20b5af7918b411ee27cf1570b.camel@redhat.com \
    --to=bberg@redhat.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=changbin.du@intel.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan.hedberg@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=luiz.von.dentz@intel.com \
    --cc=marcel@holtmann.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=stern@rowland.harvard.edu \
    --cc=syzbot+485cc00ea7cf41dfdbf1@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=yajun.deng@linux.dev \
    /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 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.