[PW_SID:1124641] [v4] Bluetooth: virtio: Fix virtbt_probe() init and cleanup#418
[PW_SID:1124641] [v4] Bluetooth: virtio: Fix virtbt_probe() init and cleanup#418BluezTestBot wants to merge 6 commits into
Conversation
This patch adds workflow files for ci: [sync.yml] - The workflow file for scheduled work - Sync the repo with upstream repo and rebase the workflow branch - Review the patches in the patchwork and creates the PR if needed [ci.yml] - The workflow file for CI tasks - Run CI tests when PR is created Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
This replaces the bzcafe action with bluez/action-ci so we can maintain everything in the github bluez organization Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This attempts to sync every 5 minutes instead of 30. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
bluez/action-ci uses master as default branch for workflow which is incorrect for kernel Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The CI action now creates individual GitHub Check Runs per test, which requires 'checks: write' permission on the GITHUB_TOKEN. Also make the pull_request trigger types explicit to include 'reopened', allowing CI to be retriggered by closing and reopening a PR.
virtbt_probe() allocates vbt before setting up the virtqueues, but some failure paths return without freeing it. The probe path also registers the HCI device before the virtio transport is opened. Since hci_register_dev() makes the HCI device visible and queues power_on work, move it after virtio_device_ready() and virtbt_open_vdev() so the transport is ready before the HCI core can use it. On failures after DRIVER_OK, reset and close the virtio device before deleting the virtqueues and freeing vbt. This also cancels pending rx work before vbt is freed. Fixes: afd2daa ("Bluetooth: Add support for virtio transport driver") Fixes: dc65b4b ("Bluetooth: virtio_bt: fix device removal") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
|
CheckPatch |
|
VerifyFixes |
|
VerifySignedoff |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
CheckKernelLLVM |
|
TestRunnerSetup |
|
IncrementalBuild |
f4a4fe6 to
2b92ce2
Compare
virtbt_probe() allocates vbt before setting up the virtqueues, but some
failure paths return without freeing it.
The probe path also registers the HCI device before the virtio transport
is opened. Since hci_register_dev() makes the HCI device visible and queues
power_on work, move it after virtio_device_ready() and virtbt_open_vdev()
so the transport is ready before the HCI core can use it.
On failures after DRIVER_OK, reset and close the virtio device before
deleting the virtqueues and freeing vbt. This also cancels pending rx work
before vbt is freed.
Fixes: afd2daa ("Bluetooth: Add support for virtio transport driver")
Fixes: dc65b4b ("Bluetooth: virtio_bt: fix device removal")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li haoxiang_li2024@163.com
Changes in v2:
Rework virtbt_probe() error paths into an unwind ladder.
Free vbt on probe failures.
Reset the virtio device and unregister the HCI device before freeing it
when virtbt_open_vdev() fails.
Close the virtio device before unregistering the HCI device in remove().
Thanks Dan for the suggestions. The blog is very helpful.
Changes in v3:
Changes in v4:
drivers/bluetooth/virtio_bt.c | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)