Commit 6394bade authored by I Viswanath's avatar I Viswanath Committed by Greg Kroah-Hartman
Browse files

net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast



[ Upstream commit 958baf5e ]

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: default avatar <syzbot+78cae3f37c62ad092caa@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=78cae3f37c62ad092caa


Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Tested-by: default avatarMichal Pecio <michal.pecio@gmail.com>
Signed-off-by: default avatarI Viswanath <viswanathiyyappan@gmail.com>
Link: https://patch.msgid.link/20250924134350.264597-1-viswanathiyyappan@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7c853408
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment