Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3a965ed authored by Manu Gautam's avatar Manu Gautam
Browse files

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: default avatarManu Gautam <mgautam@codeaurora.org>
parent fffe6d0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment