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

Commit 0ff08b4d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ashmem: add mutex to set size ioctl"

parents fe53d4f4 79b63e66
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -789,10 +789,12 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		break;
	case ASHMEM_SET_SIZE:
		ret = -EINVAL;
		mutex_lock(&ashmem_mutex);
		if (!asma->file) {
			ret = 0;
			asma->size = (size_t) arg;
		}
		mutex_unlock(&ashmem_mutex);
		break;
	case ASHMEM_GET_SIZE:
		ret = asma->size;