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

Commit e11a12a0 authored by Manoj Prabhu B's avatar Manoj Prabhu B
Browse files

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: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent 86691680
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -640,13 +640,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;