Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 331de00a authored by Sergio Aguirre's avatar Sergio Aguirre Committed by Sarah Sharp
Browse files

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 9574323c "xHCI: test
USB2 software LPM".

Signed-off-by: default avatarSergio Aguirre <sergio.a.aguirre.rodriguez@intel.com>
Acked-by: default avatarDavid Cohen <david.a.cohen@intel.com>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
parent 2a0ebf80
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment