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

Commit b900f7d3 authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: android: Fix possible race in terms of using ffs_function



When adbd is being killed and restarted, android_disable() and
android_enable() APIs are called from functionfs_closed_callback()
and functionfs_ready_callback(). config->func is being allocated
and updated with mutex_lock acquire whereas it is freed without
mutex_lock from functionfs_closed_callback(). Hence make sure
to allocate and de-allocate ffs_function with mutex_lock acquire.

CRs-Fixed: 888043
Change-Id: I015afe81e5e93694a462be609a119a7fdae2c928
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 40b49a34
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