diff options
| author | Tharun Kumar Merugu <mtharu@codeaurora.org> | 2017-03-15 14:04:50 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-20 06:57:56 -0700 |
| commit | 2b36fd66f78fe16a4ea356b28031f97cf66ca506 (patch) | |
| tree | 9455ebd50d54a22d7d544b81e53afcfe39c8b480 | |
| parent | 687a4eb82be5905f5400678dcaff4e98dad72e3c (diff) | |
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: Vishnu Karthik D <vikarthi@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
| -rw-r--r-- | drivers/char/adsprpc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 7820f5625266..e0106a7e31fa 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -1435,6 +1435,12 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode, int err = 0; struct timespec invoket; + VERIFY(err, fl->sctx); + if (err) + goto bail; + VERIFY(err, fl->cid >= 0 && fl->cid < NUM_CHANNELS); + if (err) + goto bail; if (fl->profile) getnstimeofday(&invoket); if (!kernel) { |
