mbox series

[SRU,B/C,0/1] Fix null pointer dereference when xHCI gets unplugged

Message ID 20180514082120.10443-1-kai.heng.feng@canonical.com
Headers show
Series Fix null pointer dereference when xHCI gets unplugged | expand

Message

Kai-Heng Feng May 14, 2018, 8:21 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1768852

[Impact]
When unplugging the Thunderbolt 3 cable from the TBT controller, kernel
oops.

[Test]
The user confirms this patch works.

[Fix]
tty_unregister_driver may be called more than 1 time in some
hotplug cases,it will cause the kernel oops. This patch checked
dbc_tty_driver to make sure it is unregistered only 1 time.

[Regression Potential]
Low. The change is to guard against null pointer, so it's the correct
behavior.

Zhengjun Xing (1):
  xhci: Fix Kernel oops in xhci dbgtty

 drivers/usb/host/xhci-dbgtty.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

AceLan Kao May 15, 2018, 2:46 a.m. UTC | #1
Acked-By: AceLan Kao <acelan.kao@canonical.com>
Kleber Sacilotto de Souza May 15, 2018, 1:19 p.m. UTC | #2
On 05/14/18 10:21, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1768852
> 
> [Impact]
> When unplugging the Thunderbolt 3 cable from the TBT controller, kernel
> oops.
> 
> [Test]
> The user confirms this patch works.
> 
> [Fix]
> tty_unregister_driver may be called more than 1 time in some
> hotplug cases,it will cause the kernel oops. This patch checked
> dbc_tty_driver to make sure it is unregistered only 1 time.
> 
> [Regression Potential]
> Low. The change is to guard against null pointer, so it's the correct
> behavior.
> 
> Zhengjun Xing (1):
>   xhci: Fix Kernel oops in xhci dbgtty
> 
>  drivers/usb/host/xhci-dbgtty.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 

Applied to bionic/master-next branch.

Thanks,
Kleber