usb: gadget: mbim: Fix BUG in spin_lock usage in mbim_read
mbim_read (thread context) and fmbim_cmd_complete (interrupt
context) share some data structures that are currently
protected using spin_lock API. This is a BUG as this spin_lock
doesn't disable local interrupts, hence, there is still a
possibility that IRQ may be fired after acquiring spin_lock.
On SMP this may result in deadlock if spin_lock is acquired
again from ISR, but on uniprocessor this more or less in this
usecase becomes NO-OP.
Change-Id: I204b3a9d825bb45787bb42017fa7f5e7b84bcfe9
Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment