]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: fix list access before init
authorVladimir Murzin <murzin.v@gmail.com>
Tue, 9 Apr 2013 18:33:31 +0000 (22:33 +0400)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 24 May 2013 16:14:47 +0000 (09:14 -0700)
commitfb58d8b0fe3cbd34acd5b8169f27bba80e249990
tree37c6e9a1055486cf2e413be5402ef6ae30cdcbbb
parentd7fb346a206acfb48c4703c2d6aa42545ce1a099
xhci: fix list access before init

If for whatever reason we fall into fail path in xhci_mem_init()
before bw table gets initialized we may access the uninitialized lists
in xhci_mem_cleanup().

Check for bw table before traversing lists in cleanup routine.

This patch should be backported to kernels as old as 3.2, that contain
the commit 2a82167efed092ad62554b5cbf6c2a3540c65b19 "xhci: Store
information about roothubs and TTs."

Reported-by: Sergey Dyasly <dserrg@gmail.com>
Tested-by: Sergey Dyasly <dserrg@gmail.com>
Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
drivers/usb/host/xhci-mem.c