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

Skip to content
Commit 8b2e4596 authored by Saket Saurabh's avatar Saket Saurabh
Browse files

usb: Fix race between diag_function_disable() and usb_diag_write()



There is a race when diag_function_disable() and usb_diag_write()
executes in parallel.
The diag context attribute is set to NULL in diag_function_disable()
which is later accessed in usb_diag_write() leading to NULL pointer
dereference.
Fix the issue by adding proper synchronization protection
for the diag context attribute in usb_diag_write().

CRs-Fixed: 620348
Change-Id: Ia2439c135bcab6ec9ed8191bd2e55cc1ac3abfdb
Signed-off-by: default avatarSaket Saurabh <ssaurabh@codeaurora.org>
parent 2b979b24
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