]> git.hungrycats.org Git - linux/commit
Bluetooth: hci_sync: Fix not checking error on hci_cmd_sync_cancel_sync
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 26 Mar 2024 16:43:17 +0000 (12:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:11:52 +0000 (15:11 +0200)
commit2b10a0a8e724c232490fd924032935d8d665e0be
treed27d7484fb8046590cf3ad1bfb8a7706d9a9eb82
parentc373f233dab44a13752daec13788e2ad3bf86410
Bluetooth: hci_sync: Fix not checking error on hci_cmd_sync_cancel_sync

commit 1c3366abdbe884be62e5a7502b4db758aa3974c6 upstream.

hci_cmd_sync_cancel_sync shall check the error passed to it since it
will be propagated using req_result which is __u32 it needs to be
properly set to a positive value if it was passed as negative othertise
IS_ERR will not trigger as -(errno) would be converted to a positive
value.

Fixes: 63298d6e752f ("Bluetooth: hci_core: Cancel request on command timeout")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Reported-and-tested-by: Thorsten Leemhuis <linux@leemhuis.info>
Closes: https://lore.kernel.org/all/08275279-7462-4f4a-a0ee-8aa015f829bc@leemhuis.info/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/hci_core.c
net/bluetooth/hci_sync.c