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

Commit 86c3ba94 authored by Satya Krishna Pindiproli's avatar Satya Krishna Pindiproli
Browse files

ASoC: qcom: qdsp6v2: fix crash due to asynchronous read/write



Whenever an async read command is issued to dsp when
the driver is not enabled, there is a crash in userspace.
The read command is disallowed in the driver and an error
is propagated to userspace which results in the crash.
The driver is re-enabled in a subsequent asynchronous write
command anyway, so the async read command can be allowed.
Ensure that read is allowed by removing a superfluous check.

CRs-Fixed: 675131
Signed-off-by: default avatarSatya Krishna Pindiproli <satyak@codeaurora.org>
Change-Id: I5d0598e37d08ac1090f98c24be49fd99c132e22f
parent 5b5abd71
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1537,7 +1537,7 @@ static long audio_aio_ioctl(struct file *file, unsigned int cmd,
	}
	case AUDIO_ASYNC_READ: {
		mutex_lock(&audio->read_lock);
		if ((audio->feedback) && (audio->enabled))
		if (audio->feedback)
			rc = audio_aio_buf_add(audio, 0,
					(void __user *)arg);
		else
@@ -1825,7 +1825,7 @@ static long audio_aio_compat_ioctl(struct file *file, unsigned int cmd,
	}
	case AUDIO_ASYNC_READ_32: {
		mutex_lock(&audio->read_lock);
		if ((audio->feedback) && (audio->enabled))
		if (audio->feedback)
			rc = audio_aio_buf_add_compat(audio, 0,
					(void __user *)arg);
		else