Skip to content
Commit 4cb42217 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: dwc3: gadget: fix for possible endpoint disable race



when we call dwc3_gadget_giveback(), we end up
releasing our controller's lock. Another thread
could get scheduled and disable the endpoint,
subsequently setting dep->endpoint.desc to NULL.

In that case, we would end up dereferencing a NULL
pointer which would result in a Kernel Oops. Let's
avoid the problem by simply returning early if we
have a NULL descriptor.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 9cad39fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment