diag: Fix race condition while closing SMD
This patch extends protection while closing SMD/socket while feature mask processing. CRs-Fixed: 1059771 Change-Id: Icdf27dce5b3eb7cfc4a7686f044195db13a81a58 Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
This commit is contained in:
parent
b7b9ec64a7
commit
f139281b60
1 changed files with 1 additions and 2 deletions
|
@ -651,13 +651,12 @@ void diagfwd_close_transport(uint8_t transport, uint8_t peripheral)
|
|||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
mutex_lock(&driver->diagfwd_channel_mutex);
|
||||
fwd_info = &early_init_info[transport][peripheral];
|
||||
if (fwd_info->p_ops && fwd_info->p_ops->close)
|
||||
fwd_info->p_ops->close(fwd_info->ctxt);
|
||||
mutex_lock(&driver->diagfwd_channel_mutex);
|
||||
fwd_info = &early_init_info[transport_open][peripheral];
|
||||
dest_info = &peripheral_info[TYPE_CNTL][peripheral];
|
||||
dest_info->inited = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue