Details

[Home]

Issue of the Implementation # L0206

Brief

usb: gadget: pch-udc: fix deadlock in pch-udc

Detailed Description

pch-udc code that handles USB_RESET interrupt contains unavoidable deadlock. pch_udc_isr() locks dev->lock, then calls to pch_udc_dev_isr(dev, dev_intr) that seems to have a couple of locks dev->lock itself:

pch_udc_isr()
  spin_lock(&dev->lock);
  pch_udc_dev_isr(dev, dev_intr);
    pch_udc_svc_ur_interrupt(dev);
      empty_req_queue(ep);
        complete_req(ep, req, -ESHUTDOWN);
          spin_lock(&dev->lock);                  <--- deadlock
      if (dev->driver) { spin_lock(&dev->lock); } <--- deadlock

Component

linux-kernel 4.3

Accepted

https://lkml.org/lkml/2015/9/28/256
commit

Status

Fixed in kernel 4.4-rc1

[Home]