mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
USB: serial: fix dynamic id driver deregistration race
Only free the dynamic ids after having deregistered the driver and
removed the "new_id" attribute to avoid leaking any id added by a racing
write to the attribute.
Fixes: 93bacefc4c ("USB serial: add dynamic id support to usb-serial core")
Cc: stable@vger.kernel.org # 2.6.21
Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
33c920f7c5
commit
63594e8ffe
|
|
@ -165,7 +165,7 @@ int usb_serial_bus_register(struct usb_serial_driver *driver)
|
|||
|
||||
void usb_serial_bus_deregister(struct usb_serial_driver *driver)
|
||||
{
|
||||
free_dynids(driver);
|
||||
driver_unregister(&driver->driver);
|
||||
free_dynids(driver);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user