usb: gadget: mbim: protect packets queue corruption
The f_mbim usb function driver maintain a packets queue sent from the
host as encapsulated commands which need to be read by the QBI using the
mbim_read fops.
In case of excessive messages arriving from the host we end up with simple
race condition between the queue writer and queue reader which end up in
corruption of the queue and packet loss.
Simply add a missing lock protection upon reading (deleting) a packet from
queue.
CRs-Fixed: 576720
Change-Id: I8aff04745f02cbefd3d6b83d944cad9aa1726ebf
Signed-off-by:
Ido Shayevitz <idos@codeaurora.org>
Loading
Please register or sign in to comment