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

Commit 4d28dff2 authored by Ravi Aravamudhan's avatar Ravi Aravamudhan
Browse files

diag: Fix improper handling of Diag real time vote IOCTL



Diag driver continues to process data copied from user space even
when it is invalid. Make changes to return from the function when
this happens.

Change-Id: Ieae335c908615dc63b977b7253b0d219e7db600e
Signed-off-by: default avatarRavi Aravamudhan <aravamud@codeaurora.org>
parent 9af769f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1097,7 +1097,7 @@ long diagchar_ioctl(struct file *filp,
	case DIAG_IOCTL_VOTE_REAL_TIME:
		if (copy_from_user(&rt_vote, (void *)ioarg, sizeof(struct
							real_time_vote_t)))
			result = -EFAULT;
			return -EFAULT;
		driver->real_time_update_busy++;
		if (rt_vote.proc == DIAG_PROC_DCI) {
			diag_dci_set_real_time(rt_vote.real_time_vote);