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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240620204832.24518-3-ftoth@exalondelft.nl>
Date: Thu, 20 Jun 2024 22:46:42 +0200
From: Ferry Toth <ftoth@...londelft.nl>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Ferry Toth <ftoth@...londelft.nl>,
	Richard Acayan <mailingradian@...il.com>,
	Justin Stitt <justinstitt@...gle.com>,
	"Ricardo B. Marliere" <ricardo@...liere.net>,
	Linyu Yuan <quic_linyyuan@...cinc.com>,
	Hardik Gajjar <hgajjar@...adit-jv.com>,
	linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...el.com>,
	s.hauer@...gutronix.de,
	jonathanh@...dia.com,
	paul@...pouillou.net,
	quic_eserrao@...cinc.com,
	erosca@...adit-jv.com,
	regressions@...mhuis.info,
	Ferry Toth <fntoth@...il.com>,
	stable@...r.kernel.org
Subject: [PATCH v3 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach"

This reverts commit f49449fbc21e7e9550a5203902d69c8ae7dfd918.

This commit breaks u_ether on some setups (at least Merrifield). The fix
"usb: gadget: u_ether: Re-attach netif device to mirror detachment" party
restores u-ether. However the netif usb: remains up even usb is switched
from device to host mode. This creates problems for user space as the
interface remains in the routing table while not realy present and network
managers (connman) not detecting a network change.

Various attempts to find the root cause were unsuccesful up to now. Therefore
revert until a solution is found.

Link: https://lore.kernel.org/linux-usb/20231006141231.7220-1-hgajjar@de.adit-jv.com/
Reported-by: Andy Shevchenko <andriy.shevchenko@...el.com>
Reported-by: Ferry Toth <fntoth@...il.com>
Fixes: f49449fbc21e ("usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach")
Cc: stable@...r.kernel.org
Signed-off-by: Ferry Toth <fntoth@...il.com>
---
 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 aa0511c3a62c..95191083b455 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -1200,7 +1200,7 @@ void gether_disconnect(struct gether *link)
 
 	DBG(dev, "%s\n", __func__);
 
-	netif_device_detach(dev->net);
+	netif_stop_queue(dev->net);
 	netif_carrier_off(dev->net);
 
 	/* disable endpoints, forcing (synchronous) completion
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ