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

Skip to content
Commit 7d4bc769 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Sivasri Kumar Vanka
Browse files

usb: gadget: u_ether: Fix memory corruption in TX path



When data aggregation is enabled, multiple skb buffers are copied
into a single USB request buffer.  When ever a USB request queue
is failed, make sure that req->length is reset to 0.  Otherwise
when the same request is used again, the stale length field is
used to access the request buffer.  This would lead to the memory
corruption.

The xmit function keeps the partial request at the beginning of
the queue.  Always put the idle request at the back of the queue.

Change-Id: Idcd31e667b0bf261ab9a88f4a34464ccdf503e1b
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarSivasri Kumar Vanka <sivasri@codeaurora.org>
parent 5c21e5a2
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