]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: xr: fix NULL-deref on disconnect
authorJohan Hovold <johan@kernel.org>
Fri, 26 Feb 2021 10:08:26 +0000 (11:08 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 9 Mar 2021 08:05:36 +0000 (09:05 +0100)
commit4603d9b2726cb7b3445cd4a36798ec101a2ce41b
tree5d71f759ec396474bf697b7e66de7558870563e0
parent4c1ac0d0c5c53b485798b6d83d77e13e27544011
USB: serial: xr: fix NULL-deref on disconnect

Claiming the sibling control interface is a bit more involved and
specifically requires adding support to USB-serial core for managing
either interface being unbound first, something which could otherwise
lead to a NULL-pointer dereference.

Similarly, additional infrastructure is also needed to handle suspend
properly.

Since the driver currently isn't actually using the control interface,
we can defer this for now by simply not claiming the control interface.

Fixes: 42183a575794 ("USB: serial: add MaxLinear/Exar USB to Serial driver")
Reported-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/xr_serial.c