OSDN Git Service

xhci: check virt_dev is valid before dereferencing it
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 29 Jan 2021 13:00:23 +0000 (15:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jan 2021 13:16:50 +0000 (14:16 +0100)
commit03ed579d9d51aa018830b0de3e8b463faf6b87db
tree1779472473f85d0f5d284a444c9ee05818ab92a5
parentb1adc42d440df3233255e313a45ab7e9b2b74096
xhci: check virt_dev is valid before dereferencing it

Check that the xhci_virt_dev structure that we dug out based
on a slot_id value from a command completion is valid before
dereferencing it.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210129130044.206855-7-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c