]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: suppress driver bind attributes
authorJohan Hovold <johan@kernel.org>
Thu, 16 Jan 2020 16:07:05 +0000 (17:07 +0100)
committerJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 10:11:26 +0000 (11:11 +0100)
commit00ed220c1b6348fe38a58779389a8861897a7b27
treebee2c0a59c13b0541ca708db04de284c3fc64139
parent8ae6bc1b28c073ec987ed5663869210e64537c12
USB: serial: suppress driver bind attributes

USB-serial drivers must not be unbound from their ports before the
corresponding USB driver is unbound from the parent interface so
suppress the bind and unbind attributes.

Unbinding a serial driver while it's port is open is a sure way to
trigger a crash as any driver state is released on unbind while port
hangup is handled on the parent USB interface level. Drivers for
multiport devices where ports share a resource such as an interrupt
endpoint also generally cannot handle individual ports going away.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/usb-serial.c