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

Commit 936c42fc authored by Laura Abbott's avatar Laura Abbott
Browse files

ion: Fixup custom compat ioctl



If the task that is calling the compat ioctl is not a compat
task, pass through the arguments to the regular ioctl. The ioctl
sizes may be different because of type size differences so the
compat ioctl cmd may not match the incoming cmd. Also, the types
of offset and length are ints not longs so change the types accordingly.

Change-Id: I32585e07a556f18dda81c64683d061b48c773311
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 63ca90df
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@ struct compat_ion_flush_data {
	compat_ion_user_handle_t handle;
	compat_int_t fd;
	compat_uptr_t vaddr;
	compat_ulong_t offset;
	compat_ulong_t length;
	compat_uint_t offset;
	compat_uint_t length;
};

struct compat_ion_prefetch_data {
@@ -149,6 +149,9 @@ long compat_msm_ion_ioctl(struct ion_client *client, unsigned int cmd,

	}
	default:
		if (is_compat_task())
			return -ENOIOCTLCMD;
		else
			return msm_ion_custom_ioctl(client, cmd, arg);
	}
}