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

Skip to content
Commit 3e920c48 authored by Sujeet Kumar's avatar Sujeet Kumar
Browse files

USB: u_bam: Avoid NULL pointer dereference in gbam_connect_work



In gbam_connect_work the port_usb may be NULL
as this might have been freed from gbam_free_requests
as part of gbam_disconnect. This is because
gbam_connect and rmnet_disable can run in parallel.
When back to back rmnet connect and disconnect happens,
this issue occurs.

Protect NULL pointer dereference by adding a NULL
check for port_usb. This pointer is already protected
under spinlock.

Also, if gbam_start_io fails for rx requests allocation
then free the tx requests, not the rx.

CRs-Fixed: 647073
Change-Id: I9d3a15ab2523d30365ac7ab8ce021fe513269b32
Signed-off-by: default avatarSujeet Kumar <ksujeet@codeaurora.org>
parent 707fd824
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