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

Commit 46135d80 authored by Mohammad Johny Shaik's avatar Mohammad Johny Shaik Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarMohammad Johny Shaik <mjshai@codeaurora.org>
parent bd52ce2e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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",