public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* WARNING in ar5523_cmd/usb_submit_urb
@ 2024-04-07 13:00 Nikita Zhandarovich
  2024-04-07 13:32 ` [syzbot] [usb?] [wireless?] " syzbot
  0 siblings, 1 reply; 3+ messages in thread
From: Nikita Zhandarovich @ 2024-04-07 13:00 UTC (permalink / raw)
  To: syzbot+1bc2c2afd44f820a669f
  Cc: Nikita Zhandarovich, syzkaller-bugs, linux-kernel

Enable endpoint checking.

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e
---
 drivers/net/wireless/ath/ar5523/ar5523.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index 815f8f599f5d..5cac4a6452db 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -1594,6 +1594,20 @@ static int ar5523_probe(struct usb_interface *intf,
 	struct ar5523 *ar;
 	int error = -ENOMEM;
 
+	static u8 bulk_ep_addr[] = {
+		AR5523_CMD_TX_PIPE | USB_DIR_OUT,
+		AR5523_DATA_TX_PIPE | USB_DIR_OUT,
+		AR5523_CMD_RX_PIPE | USB_DIR_IN,
+		AR5523_DATA_RX_PIPE | USB_DIR_IN,
+		0};
+
+	if (!usb_check_bulk_endpoints(intf, bulk_ep_addr)) {
+		dev_err(&dev->dev,
+			"Could not find all expected endpoints\n");
+		error = -ENODEV;
+		goto out;
+	}
+
 	/*
 	 * Load firmware if the device requires it.  This will return
 	 * -ENXIO on success and we'll get called back afer the usb

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* WARNING in ar5523_cmd/usb_submit_urb
@ 2024-04-05 14:06 Nikita Zhandarovich
  2024-04-06 14:19 ` [syzbot] [usb?] [wireless?] " syzbot
  0 siblings, 1 reply; 3+ messages in thread
From: Nikita Zhandarovich @ 2024-04-05 14:06 UTC (permalink / raw)
  To: syzbot+1bc2c2afd44f820a669f
  Cc: Nikita Zhandarovich, syzkaller-bugs, linux-kernel

Enable endpoint checking.

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
 drivers/net/wireless/ath/ar5523/ar5523.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index 815f8f599f5d..5cac4a6452db 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -1594,6 +1594,20 @@ static int ar5523_probe(struct usb_interface *intf,
 	struct ar5523 *ar;
 	int error = -ENOMEM;
 
+	static u8 bulk_ep_addr[] = {
+		AR5523_CMD_TX_PIPE | USB_DIR_OUT,
+		AR5523_DATA_TX_PIPE | USB_DIR_OUT,
+		AR5523_CMD_RX_PIPE | USB_DIR_IN,
+		AR5523_DATA_RX_PIPE | USB_DIR_IN,
+		0};
+
+	if (!usb_check_bulk_endpoints(intf, bulk_ep_addr)) {
+		dev_err(&dev->dev,
+			"Could not find all expected endpoints\n");
+		error = -ENODEV;
+		goto out;
+	}
+
 	/*
 	 * Load firmware if the device requires it.  This will return
 	 * -ENXIO on success and we'll get called back afer the usb

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

end of thread, other threads:[~2024-04-07 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-07 13:00 WARNING in ar5523_cmd/usb_submit_urb Nikita Zhandarovich
2024-04-07 13:32 ` [syzbot] [usb?] [wireless?] " syzbot
  -- strict thread matches above, loose matches on Subject: below --
2024-04-05 14:06 Nikita Zhandarovich
2024-04-06 14:19 ` [syzbot] [usb?] [wireless?] " syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox