Hi Benjamin,
syzbot reported that hci_cmd_sync_cancel may sleep from the wrong
context. To avoid this, create a new work item that pushes the relevant
parts into a different context.
Note that we keep the old implementation with the name
__hci_cmd_sync_cancel as the sleeping behaviour is desired in some
cases.
Reported-and-tested-by: syzbot+485cc00ea7cf41dfdbf1@syzkaller.appspotmail.com
Fixes: c97a747efc93 ("Bluetooth: btusb: Cancel sync commands for certain URB errors")
Signed-off-by: Benjamin Berg <redacted>
---
v2:
- Add Signed-off-by and changed email address
---
include/net/bluetooth/hci_core.h | 1 +
include/net/bluetooth/hci_sync.h | 1 +
net/bluetooth/hci_core.c | 2 +-
net/bluetooth/hci_request.c | 2 +-
net/bluetooth/hci_sync.c | 27 ++++++++++++++++++++++++++-
5 files changed, 30 insertions(+), 3 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel