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

Commit b7bb0a0e authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu Committed by Gerrit - the friendly Code Review server
Browse files

msm: ADSPRPC: Null check for file session context



When any system call is made, before servicing it make sure that the
session context is not null and channel info is valid.

Change-Id: Ieba53b123d6553c5381db9f0b6d57b8f343e6155
Acked-by: default avatarVishnu Karthik D <vikarthi@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent b81d100b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1312,6 +1312,13 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
	int interrupted = 0;
	int err = 0;

	VERIFY(err, fl->sctx);
	if (err)
		goto bail;
	VERIFY(err, fl->cid >= 0 && fl->cid < NUM_CHANNELS);
	if (err)
		goto bail;

	if (!kernel) {
		VERIFY(err, 0 == context_restore_interrupted(fl, invokefd,
								&ctx));