USB: gadget: u_bam_data: Check USB state under spinlock
While starting/stopping endless transfers, USB may get
disconnected. This is checked using port_data just before
calling usb_ep_queue. But, this is possibility of disconnect
happening after this check resulting in NULL pointer
dereference when accessing port_usb->in/out EPs. Fix this
by checking for cable connection under spinlock and using
a copy of EP context for calling usb_ep_queue.
Change-Id: I196650223f1350a5c5cc2cd173a67dc3c64c2dc6
CRs-fixed: 756048
Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment