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

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

msm: ADSPRPC: Reject I/O requests during audio PDR



Do not process any I/O requests belonging to audioPD if
audio PD is not up.

Change-Id: Id419aede0aa4cc5ee103d1be48786849cb305405
Acked-by: default avatarVishnu Karthik D <vikarthi@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 1e5b6117
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -3375,12 +3375,24 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num,
	} i;
	void *param = (char *)ioctl_param;
	struct fastrpc_file *fl = (struct fastrpc_file *)file->private_data;
	int size = 0, err = 0;
	struct fastrpc_apps *me = &gfa;
	int size = 0, err = 0, session = 0;
	uint32_t info;

	p.inv.fds = NULL;
	p.inv.attrs = NULL;
	p.inv.crc = NULL;
	if (fl->spdname &&
		!strcmp(fl->spdname, AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME)) {
		VERIFY(err, !fastrpc_get_adsp_session(
			AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME, &session));
		if (err)
			goto bail;
		if (!me->channel[fl->cid].spd[session].ispdup) {
			err = -ENOTCONN;
			goto bail;
		}
	}
	spin_lock(&fl->hlock);
	if (fl->file_close == 1) {
		err = EBADF;