lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <155be9e56e650dd7f7baf1c7e193e1a3d85e7141.camel@gmail.com>
Date: Tue, 17 Sep 2024 15:56:33 +0200
From: Hubert Wiśniewski <hubert.wisniewski.25632@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Ferry Toth
 <ftoth@...londelft.nl>, Hardik Gajjar <hgajjar@...adit-jv.com>, Kees Cook
 <kees@...nel.org>, Justin Stitt <justinstitt@...gle.com>, Richard Acayan
 <mailingradian@...il.com>, Jeff Johnson <quic_jjohnson@...cinc.com>, 
 "Ricardo B. Marliere" <ricardo@...liere.net>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Toke
 Høiland-Jørgensen <toke@...hat.com>, Sebastian Andrzej
 Siewior <bigeasy@...utronix.de>,  linux-usb@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: [PATCH v3] usb: gadget: u_ether: Use __netif_rx() in rx_callback()

netif_rx() now disables bottom halves, which causes the USB gadget to be
unable to receive frames if the interface is not brought up quickly enough
after being created by the driver (a bug confirmed on AM3352 SoC).

Replacing netif_rx() with __netif_rx() restores the old behavior and fixes
the bug. This can be done since rx_callback() is called from the interrupt
context.

Fixes: baebdf48c360 ("net: dev: Makes sure netif_rx() can be invoked in any context.")
Cc: stable@...r.kernel.org
Signed-off-by: Hubert Wiśniewski <hubert.wisniewski.25632@...il.com>
---
v2 -> v3: Added cc stable tag
v1 -> v2: Added Fixes tag and corrected Signed-off-by tag

 drivers/usb/gadget/function/u_ether.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index 4bb0553da658..fd7e483b4a48 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -266,7 +266,7 @@ static void rx_complete(struct usb_ep *ep, struct usb_request *req)
 			/* no buffer copies needed, unless hardware can't
 			 * use skb buffers.
 			 */
-			status = netif_rx(skb2);
+			status = __netif_rx(skb2);
 next_frame:
 			skb2 = skb_dequeue(&dev->rx_frames);
 		}
-- 
2.30.2




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ