sound: usb: endpoint: Add dev state check in completion handler
When a USB Headset is unplug from usb host port during audio is playing,
the system is very possible to clear the urb buffer before urb completion
handler is done. Then, clear_bit call in the completion handler will access
the freed pointer and caused the system crash. Check the dev state and skip
the clear_bit call when dev stat is USB_STATE_NOTATTACHED.
CRs-fixed: 647140
Change-Id: If51175196b598ec06b3ca0700eded18e42c363fd
Signed-off-by:
Guang Jian Zeng <gzeng@codeaurora.org>
Loading
Please register or sign in to comment