[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250920045059.48400-1-viswanathiyyappan@gmail.com>
Date: Sat, 20 Sep 2025 10:20:59 +0530
From: I Viswanath <viswanathiyyappan@...il.com>
To: petkan@...leusys.com,
andrew+netdev@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com
Cc: linux-usb@...r.kernel.org,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
skhan@...uxfoundation.org,
linux-kernel-mentees@...ts.linux.dev,
david.hunter.linux@...il.com,
I Viswanath <viswanathiyyappan@...il.com>,
syzbot+78cae3f37c62ad092caa@...kaller.appspotmail.com
Subject: [PATCH] net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast
syzbot reported WARNING in rtl8150_start_xmit/usb_submit_urb.
This is a possible sequence of events:
CPU0 (in rtl8150_start_xmit) CPU1 (in rtl8150_start_xmit) CPU2 (in rtl8150_set_multicast)
netif_stop_queue();
netif_stop_queue();
usb_submit_urb();
netif_wake_queue(); <-- Wakes up TX queue before it's ready
netif_stop_queue();
usb_submit_urb(); <-- Warning
freeing urb
Remove netif_wake_queue and corresponding netif_stop_queue in rtl8150_set_multicast to
prevent this sequence of events
Reported-and-tested-by: syzbot+78cae3f37c62ad092caa@...kaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=78cae3f37c62ad092caa
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: I Viswanath <viswanathiyyappan@...il.com>
---
Relevant logs:
[ 65.779651][ T5648] About to enter stop queue ffff88805061e000, eth4
[ 65.779664][ T5648] After stop queue ffff88805061e000, eth4
[ 65.780296][ T5648] net eth4: eth name:eth4 SUBMIT: tx_urb=ffff888023219000, status=0, transfer_buffer_length=60, dev=ffff88805061ed80, netdev=ffff88805061e000, skb=ffff88804f907b80
[ 65.790962][ T760] About to enter stop queue ffff88805061e000, eth4
[ 65.790978][ T760] After stop queue ffff88805061e000, eth4
[ 65.791874][ T760] net eth4: We are inside Multicast dev:ffff88805061ed80, netdev:ffff88805061e000
[ 65.793259][ T760] About to enter netif_wake_queue ffff88805061e000, eth4
[ 65.793264][ T760] After netif_wake_queue ffff88805061e000, eth4
[ 65.822319][ T5829] About to enter stop queue ffff88805061e000, eth4
[ 65.823135][ T5829] After stop queue ffff88805061e000, eth4
[ 65.823739][ T5829] net eth4: eth name:eth4 SUBMIT: tx_urb=ffff888023219000, status=-115, transfer_buffer_length=90, dev=ffff88805061ed80, netdev=ffff88805061e000, skb=ffff88804b5363c0
drivers/net/usb/rtl8150.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index ddff6f19ff98..92add3daadbb 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -664,7 +664,6 @@ static void rtl8150_set_multicast(struct net_device *netdev)
rtl8150_t *dev = netdev_priv(netdev);
u16 rx_creg = 0x9e;
- netif_stop_queue(netdev);
if (netdev->flags & IFF_PROMISC) {
rx_creg |= 0x0001;
dev_info(&netdev->dev, "%s: promiscuous mode\n", netdev->name);
@@ -678,7 +677,6 @@ static void rtl8150_set_multicast(struct net_device *netdev)
rx_creg &= 0x00fc;
}
async_set_registers(dev, RCR, sizeof(rx_creg), rx_creg);
- netif_wake_queue(netdev);
}
static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
--
2.47.3
Powered by blists - more mailing lists