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

Commit c9344671 authored by Pratham Pratap's avatar Pratham Pratap Committed by Gerrit - the friendly Code Review server
Browse files

usb: xhci: Avoid NULL pointer access of sec event ring



Consider a case where DUT is in a low memory condition and
it is switching between host and none frequently. This can
lead the driver to fail the allocation of primary event ring
and go into error path where it will try to cleanup the event
ring. Since secondary event ring was not even initialized, while
fetching the entries to cleanup, it will lead to NULL pointer
dereference.

Avoid this by adding a NULL check for secondary event ring before
fetching the entries and bailing out early from cleanup function.

Change-Id: I21488d0e0a02347a392d890918c5c874b704795f
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent cc3bd056
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