Skip to content

Commit 958baf5

Browse files
CraftyChimerakuba-moo
authored andcommitted
net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast
syzbot reported WARNING in rtl8150_start_xmit/usb_submit_urb. This is the sequence of events that leads to the warning: rtl8150_start_xmit() { netif_stop_queue(); usb_submit_urb(dev->tx_urb); } rtl8150_set_multicast() { netif_stop_queue(); netif_wake_queue(); <-- wakes up TX queue before URB is done } rtl8150_start_xmit() { netif_stop_queue(); usb_submit_urb(dev->tx_urb); <-- double submission } rtl8150_set_multicast being the ndo_set_rx_mode callback should not be calling netif_stop_queue and notif_start_queue as these handle TX queue synchronization. The net core function dev_set_rx_mode handles the synchronization for rtl8150_set_multicast making it safe to remove these locks. Reported-and-tested-by: syzbot+78cae3f37c62ad092caa@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=78cae3f37c62ad092caa Fixes: 1da177e ("Linux-2.6.12-rc2") Tested-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: I Viswanath <viswanathiyyappan@gmail.com> Link: https://patch.msgid.link/20250924134350.264597-1-viswanathiyyappan@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent c35cf24 commit 958baf5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/usb/rtl8150.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,6 @@ static void rtl8150_set_multicast(struct net_device *netdev)
664664
rtl8150_t *dev = netdev_priv(netdev);
665665
u16 rx_creg = 0x9e;
666666

667-
netif_stop_queue(netdev);
668667
if (netdev->flags & IFF_PROMISC) {
669668
rx_creg |= 0x0001;
670669
dev_info(&netdev->dev, "%s: promiscuous mode\n", netdev->name);
@@ -678,7 +677,6 @@ static void rtl8150_set_multicast(struct net_device *netdev)
678677
rx_creg &= 0x00fc;
679678
}
680679
async_set_registers(dev, RCR, sizeof(rx_creg), rx_creg);
681-
netif_wake_queue(netdev);
682680
}
683681

684682
static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,

0 commit comments

Comments
 (0)