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:Mayank Rana <mrana@codeaurora.org> Signed-off-by:
Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment