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

Commit 62ebeccc authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 35bfb444 f5f62233
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;