-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PW_SID:920373] [v2] Bluetooth: btusb: Add NULL check for data in btusb_suspend #2631
base: workflow
Are you sure you want to change the base?
Conversation
When performing warm boot tests with an MT7920 device, we encounter NULL pointer dereferences with failure rate 5/30. The crash occurs during device suspend when btusb attempts to access data->hdev where data is NULL. This may happen due to a race condition between PM suspend and device disconnect. The root cause needs further investigation. BUG: kernel NULL pointer dereference, address: 0000000000000000 Workqueue: pm pm_runtime_work RIP: 0010:btusb_suspend+0x1d/0x1d0 [btusb] Add a NULL check for data and return -ENODEV in this case to prevent the NULL pointer dereference. This indicates that the device is no longer available, which is appropriate when the driver's private data is missing. Signed-off-by: En-Wei Wu <[email protected]>
CheckPatch |
GitLint |
SubjectPrefix |
BuildKernel |
CheckAllWarning |
CheckSparse |
BuildKernel32 |
TestRunnerSetup |
TestRunner_l2cap-tester |
TestRunner_iso-tester |
TestRunner_bnep-tester |
TestRunner_mgmt-tester
|
TestRunner_rfcomm-tester |
TestRunner_sco-tester |
TestRunner_ioctl-tester |
TestRunner_mesh-tester
|
TestRunner_smp-tester |
TestRunner_userchan-tester |
IncrementalBuild |
When performing warm boot tests with an MT7920 device, we encounter
NULL pointer dereferences with failure rate 5/30. The crash occurs
during device suspend when btusb attempts to access data->hdev where
data is NULL. This may happen due to a race condition between PM suspend
and device disconnect. The root cause needs further investigation.
BUG: kernel NULL pointer dereference, address: 0000000000000000
Workqueue: pm pm_runtime_work
RIP: 0010:btusb_suspend+0x1d/0x1d0 [btusb]
Add a NULL check for data and return -ENODEV in this case to prevent
the NULL pointer dereference. This indicates that the device is no
longer available, which is appropriate when the driver's private data
is missing.
Signed-off-by: En-Wei Wu [email protected]
Changes in v2:
drivers/bluetooth/btusb.c | 3 +++
1 file changed, 3 insertions(+)