mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "usb: dwc3: Fix use after free crash from dwc3 interrupt handler"
This commit is contained in:
commit
8e72a3e00e
2 changed files with 8 additions and 2 deletions
|
|
@ -398,8 +398,10 @@ static void dwc3_free_event_buffers(struct dwc3 *dwc)
|
|||
struct dwc3_event_buffer *evt;
|
||||
|
||||
evt = dwc->ev_buf;
|
||||
if (evt)
|
||||
if (evt) {
|
||||
dwc3_free_one_event_buffer(dwc, evt);
|
||||
dwc->ev_buf = NULL;
|
||||
}
|
||||
|
||||
/* free GSI related event buffers */
|
||||
dwc3_notify_event(dwc, DWC3_GSI_EVT_BUF_FREE, 0);
|
||||
|
|
|
|||
|
|
@ -3661,12 +3661,16 @@ static irqreturn_t dwc3_thread_interrupt(int irq, void *_evt)
|
|||
|
||||
static irqreturn_t dwc3_check_event_buf(struct dwc3_event_buffer *evt)
|
||||
{
|
||||
struct dwc3 *dwc = evt->dwc;
|
||||
struct dwc3 *dwc;
|
||||
u32 amount;
|
||||
u32 count;
|
||||
u32 reg;
|
||||
ktime_t start_time;
|
||||
|
||||
if (!evt)
|
||||
return IRQ_NONE;
|
||||
|
||||
dwc = evt->dwc;
|
||||
start_time = ktime_get();
|
||||
dwc->irq_cnt++;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue