mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-19 21:04:26 -05:00
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
|
From 46135d80765cb70a914f02a6e7b6abe64679ec86 Mon Sep 17 00:00:00 2001
|
||
|
From: Mohammad Johny Shaik <mjshai@codeaurora.org>
|
||
|
Date: Wed, 13 Nov 2013 15:45:34 -0800
|
||
|
Subject: msm:qdsp6v2: Check null pointer on userspace data argument in kernel
|
||
|
|
||
|
The null pointer check is required to ensure that userspace data
|
||
|
in kernalspace is not null.
|
||
|
|
||
|
Change-Id: I9e522c393ae643626a4bae03731a73f5d6db6458
|
||
|
CRs-Fixed: 563752
|
||
|
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
|
||
|
---
|
||
|
sound/soc/msm/qdsp6v2/msm-lsm-client.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/sound/soc/msm/qdsp6v2/msm-lsm-client.c b/sound/soc/msm/qdsp6v2/msm-lsm-client.c
|
||
|
index fe6ed29..2bca5e18 100644
|
||
|
--- a/sound/soc/msm/qdsp6v2/msm-lsm-client.c
|
||
|
+++ b/sound/soc/msm/qdsp6v2/msm-lsm-client.c
|
||
|
@@ -170,6 +170,9 @@ static int msm_lsm_ioctl(struct snd_pcm_substream *substream,
|
||
|
*/
|
||
|
rc = -EFAULT;
|
||
|
} else {
|
||
|
+ if (!access_ok(VERIFY_READ, user,
|
||
|
+ sizeof(struct snd_lsm_event_status)))
|
||
|
+ rc = -EFAULT;
|
||
|
if (user->payload_size <
|
||
|
event_status->payload_size) {
|
||
|
pr_debug("%s: provided %dbytes isn't enough, needs %dbytes\n",
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|