aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2022-08-17 20:14:36 +0900
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-08-25 16:21:41 -0700
commit029bde79fb7969dcd9a4b2940efc06e9404a9df1 (patch)
tree0f984e704c4e442cefea65adaa783e9a216f3493 /net/bluetooth
parentBluetooth: MGMT: Fix Get Device Flags (diff)
downloadlinux-dev-029bde79fb7969dcd9a4b2940efc06e9404a9df1.tar.xz
linux-dev-029bde79fb7969dcd9a4b2940efc06e9404a9df1.zip
Bluetooth: hci_sync: fix double mgmt_pending_free() in remove_adv_monitor()
syzbot is reporting double kfree() at remove_adv_monitor() [1], for commit 7cf5c2978f23fdbb ("Bluetooth: hci_sync: Refactor remove Adv Monitor") forgot to remove duplicated mgmt_pending_remove() when merging "if (err) {" path and "if (!pending) {" path. Link: https://syzkaller.appspot.com/bug?extid=915a8416bf15895b8e07 [1] Reported-by: syzbot <syzbot+915a8416bf15895b8e07@syzkaller.appspotmail.com> Fixes: 7cf5c2978f23fdbb ("Bluetooth: hci_sync: Refactor remove Adv Monitor") Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 1cd7d6572892..77e7aa63c0c0 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5066,7 +5066,6 @@ static int remove_adv_monitor(struct sock *sk, struct hci_dev *hdev,
else
status = MGMT_STATUS_FAILED;
- mgmt_pending_remove(cmd);
goto unlock;
}