linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_sync: unlock on error in hci_inquiry_result_with_rssi_evt()
@ 2022-01-11  7:23 Dan Carpenter
  2022-01-21 22:53 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2022-01-11  7:23 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Johan Hedberg, linux-bluetooth, kernel-janitors

Add unlocks to two error paths in hci_inquiry_result_with_rssi_evt().

Fixes: fee645033e2c ("Bluetooth: hci_event: Use skb_pull_data when processing inquiry results")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 net/bluetooth/hci_event.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index f1082b7c0218..e6c75cb1c7fe 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4536,7 +4536,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, void *edata,
 			if (!info) {
 				bt_dev_err(hdev, "Malformed HCI Event: 0x%2.2x",
 					   HCI_EV_INQUIRY_RESULT_WITH_RSSI);
-				return;
+				goto unlock;
 			}
 
 			bacpy(&data.bdaddr, &info->bdaddr);
@@ -4566,7 +4566,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, void *edata,
 			if (!info) {
 				bt_dev_err(hdev, "Malformed HCI Event: 0x%2.2x",
 					   HCI_EV_INQUIRY_RESULT_WITH_RSSI);
-				return;
+				goto unlock;
 			}
 
 			bacpy(&data.bdaddr, &info->bdaddr);
@@ -4588,7 +4588,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, void *edata,
 		bt_dev_err(hdev, "Malformed HCI Event: 0x%2.2x",
 			   HCI_EV_INQUIRY_RESULT_WITH_RSSI);
 	}
-
+unlock:
 	hci_dev_unlock(hdev);
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: hci_sync: unlock on error in hci_inquiry_result_with_rssi_evt()
  2022-01-11  7:23 [PATCH] Bluetooth: hci_sync: unlock on error in hci_inquiry_result_with_rssi_evt() Dan Carpenter
@ 2022-01-21 22:53 ` Marcel Holtmann
  2022-01-21 23:18   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2022-01-21 22:53 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Luiz Augusto von Dentz, Johan Hedberg, linux-bluetooth, kernel-janitors

Hi Dan,

> Add unlocks to two error paths in hci_inquiry_result_with_rssi_evt().
> 
> Fixes: fee645033e2c ("Bluetooth: hci_event: Use skb_pull_data when processing inquiry results")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> net/bluetooth/hci_event.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

patch doesn’t apply cleanly, please rebase against bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: hci_sync: unlock on error in hci_inquiry_result_with_rssi_evt()
  2022-01-21 22:53 ` Marcel Holtmann
@ 2022-01-21 23:18   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-01-21 23:18 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Dan Carpenter, Johan Hedberg, linux-bluetooth, kernel-janitors

Hi Marcel,

On Fri, Jan 21, 2022 at 2:53 PM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Dan,
>
> > Add unlocks to two error paths in hci_inquiry_result_with_rssi_evt().
> >
> > Fixes: fee645033e2c ("Bluetooth: hci_event: Use skb_pull_data when processing inquiry results")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > net/bluetooth/hci_event.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> patch doesn’t apply cleanly, please rebase against bluetooth-next tree.
>
> Regards
>
> Marcel

Ive already applied this one:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=c07ba878ca199a6089cdb323bf526adbeeb4201f

Might have forgotten to reply here.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-21 23:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11  7:23 [PATCH] Bluetooth: hci_sync: unlock on error in hci_inquiry_result_with_rssi_evt() Dan Carpenter
2022-01-21 22:53 ` Marcel Holtmann
2022-01-21 23:18   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).