diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-05-18 12:37:21 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-06-20 12:32:37 +0300 |
commit | 4cb4221764ef473cd36e1953f1fea11865786d65 (patch) | |
tree | 133a36b3808857ad4d6cf0feff76c3ee245f6f4a /drivers/usb/dwc3/core.c | |
parent | 9cad39fe4e4a4fe95d8ea5a7b0692b0a6e89e38b (diff) |
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: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
0 files changed, 0 insertions, 0 deletions