[PATCH OLK-6.6] Bluetooth: hci_sync: fix double unlock in hci_discovery_filter_clear()
hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9070 -------------------------------- hci_discovery_filter_clear() acquires hdev->discovery.lock only once, but due to the patch being applied repeatedly, spin_unlock() is called twice. This leads to an unmatched unlock and may cause preempt count underflow, resulting in scheduling warnings or other unexpected behavior. Delete the extra spin_unlock() at the end of the function. Fixes: ec03e0b8aa81 ("Bluetooth: hci_sync: fix double free in 'hci_discovery_filter_clear()'") Fixes: 5b70b93fc768 ("Bluetooth: hci_sync: fix double free in 'hci_discovery_filter_clear()'") Signed-off-by: Fanhua Li <lifanhua5@huawei.com> --- include/net/bluetooth/hci_core.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 9a15072d77f8..4d4923d43cb1 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -903,7 +903,6 @@ static inline void hci_discovery_filter_clear(struct hci_dev *hdev) hdev->discovery.scan_start = 0; hdev->discovery.scan_duration = 0; - spin_unlock(&hdev->discovery.lock); } bool hci_discovery_active(struct hci_dev *hdev); -- 2.43.0
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/22113 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/47J... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/22113 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/47J...
participants (2)
-
Fanhua Li -
patchwork bot