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

Commit 64095bee authored by Benet Clark's avatar Benet Clark
Browse files

msm: mdss: Change notify_update ioctl copy size to match ioctl definition



The MSMFB_NOTIFY_UPDATE ioctl is defined based on sizeof(unsigned int).
However, we use the incorrect size when copying to and from userspace.
The sizes for copying have been fixed to match the ioctl definition.

Change-Id: I0f63228e5b4ad936d89c5f2bcbd84204037a0edf
Signed-off-by: default avatarBenet Clark <benetc@codeaurora.org>
parent 104105f6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -143,9 +143,9 @@ static int mdss_fb_notify_update(struct msm_fb_data_type *mfd,
							unsigned long *argp)
{
	int ret;
	unsigned long notify = 0x0, to_user = 0x0;
	unsigned int notify = 0x0, to_user = 0x0;

	ret = copy_from_user(&notify, argp, sizeof(unsigned long));
	ret = copy_from_user(&notify, argp, sizeof(unsigned int));
	if (ret) {
		pr_err("%s:ioctl failed\n", __func__);
		return ret;
@@ -195,7 +195,7 @@ static int mdss_fb_notify_update(struct msm_fb_data_type *mfd,
	if (ret == 0)
		ret = -ETIMEDOUT;
	else if (ret > 0)
		ret = copy_to_user(argp, &to_user, sizeof(unsigned long));
		ret = copy_to_user(argp, &to_user, sizeof(unsigned int));
	return ret;
}