summaryrefslogtreecommitdiff
path: root/drivers/usb/host/isp116x-hcd.c
diff options
context:
space:
mode:
authorSergio Aguirre <sergio.a.aguirre.rodriguez@intel.com>2013-04-04 10:32:13 -0700
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2013-05-24 09:14:47 -0700
commit331de00a64e5027365145bdf51da27b9ce15dfd5 (patch)
tree7ccf97556fec4986651e1a816b8801294908c2b9 /drivers/usb/host/isp116x-hcd.c
parent2a0ebf80aa95cc758d4725f74a7016e992606a39 (diff)
xhci-mem: init list heads at the beginning of init
It is possible that we fail on xhci_mem_init, just before doing the INIT_LIST_HEAD, and calling xhci_mem_cleanup. Problem is that, the list_for_each_entry_safe macro, assumes list heads are initialized (not NULL), and dereferences their 'next' pointer, causing a kernel panic if this is not yet initialized. Let's protect from that by moving inits to the beginning. This patch should be backported to kernels as old as 3.2, that contain the commit 9574323c39d1f8359a04843075d89c9f32d8b7e6 "xHCI: test USB2 software LPM". Signed-off-by: Sergio Aguirre <sergio.a.aguirre.rodriguez@intel.com> Acked-by: David Cohen <david.a.cohen@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/isp116x-hcd.c')
0 files changed, 0 insertions, 0 deletions