usb: misc: diag_bridge: Fix races between delete and read/write
It might be possible that some read/write requests are pending
after diag_bridge_close has been called. This might lead to
use-after-free scenarios of the 'dev' structure if it is freed
by delete() while read/write is in progress. Fix this by using
global mutex to protect 'dev' in read/write and delete functions.
Change-Id: I0f9fd8bca82fc43c9ea7d340093aed5f7c263040
Signed-off-by:
Ajay Agarwal <ajaya@codeaurora.org>
Loading
Please register or sign in to comment