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

Skip to content
Commit 19d6c4da authored by Mayank Rana's avatar Mayank Rana Committed by Hemant Kumar
Browse files

usb: gadget: composite: Protect cdev in composite_suspend()



With USB cable disconnect case, there is race happening when
composite_suspend() is being pre-empted just after getting
reference to cdev structure (suspend flow) and cdev->config
set to NULL as part of reset_config() (disconnect flow). This
results into composite_suspend() using bad value with cdev->config
which is resulting in some cases multiple time calling f->suspend().
Fix this issue by protecting cdev in composite_suspend() API.

CRs-Fixed: 916718
Change-Id: Id0b2a254f64621fcbc19c0556265e9b7b32f1382
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent b0b4c0fa
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