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