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>] [day] [month] [year] [list]
Message-ID: <20240913102325.2826261-1-jkeeping@inmusicbrands.com>
Date: Fri, 13 Sep 2024 11:23:23 +0100
From: John Keeping <jkeeping@...usicbrands.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: John Keeping <jkeeping@...usicbrands.com>,
	stable@...r.kernel.org,
	Roy Luo <royluo@...gle.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Krishna Kurapati <quic_kriskura@...cinc.com>,
	yuan linyu <yuanlinyu@...onor.com>,
	Chris Wulff <crwulff@...il.com>,
	Paul Cercueil <paul@...pouillou.net>,
	linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH v3] usb: gadget: core: force synchronous registration

Registering a gadget driver is expected to complete synchronously and
immediately after calling driver_register() this function checks that
the driver has bound so as to return an error.

Set PROBE_FORCE_SYNCHRONOUS to ensure this is the case even when
asynchronous probing is set as the default.

Fixes: fc274c1e99731 ("USB: gadget: Add a new bus for gadgets")
Cc: stable@...r.kernel.org
Signed-off-by: John Keeping <jkeeping@...usicbrands.com>
---
v3:
- Add cc: stable
v2:
- Add "Fixes" trailer

 drivers/usb/gadget/udc/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index cf6478f97f4a..a6f46364be65 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -1696,6 +1696,7 @@ int usb_gadget_register_driver_owner(struct usb_gadget_driver *driver,
 	driver->driver.bus = &gadget_bus_type;
 	driver->driver.owner = owner;
 	driver->driver.mod_name = mod_name;
+	driver->driver.probe_type = PROBE_FORCE_SYNCHRONOUS;
 	ret = driver_register(&driver->driver);
 	if (ret) {
 		pr_warn("%s: driver registration failed: %d\n",
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ