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

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

Merge "msm:adsprpc: Fix 32 bit error in capability API"

parents 247b2c85 d7170036
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3595,7 +3595,7 @@ static int fastrpc_get_info_from_kernel(
	 * kernel
	 * kernel
	 */
	 */
	if (cap->attribute_ID >= FASTRPC_MAX_ATTRIBUTES) {
	if (cap->attribute_ID >= FASTRPC_MAX_ATTRIBUTES) {
		err = EOVERFLOW;
		err = -EOVERFLOW;
		cap->capability = 0;
		cap->capability = 0;
		goto bail;
		goto bail;
	}
	}
+5 −1
Original line number Original line Diff line number Diff line
@@ -743,7 +743,7 @@ static int compat_fastrpc_get_dsp_info(struct file *filp,
		unsigned long arg)
		unsigned long arg)
{
{
	struct compat_fastrpc_ioctl_capability __user *info32;
	struct compat_fastrpc_ioctl_capability __user *info32;
	struct fastrpc_ioctl_capability *info;
	struct fastrpc_ioctl_capability __user *info;
	compat_uint_t u;
	compat_uint_t u;
	long ret;
	long ret;
	int err = 0;
	int err = 0;
@@ -756,6 +756,10 @@ static int compat_fastrpc_get_dsp_info(struct file *filp,


	err = get_user(u, &info32->domain);
	err = get_user(u, &info32->domain);
	err |= put_user(u, &info->domain);
	err |= put_user(u, &info->domain);

	err = get_user(u, &info32->attribute_ID);
	err |= put_user(u, &info->attribute_ID);

	if (err)
	if (err)
		return err;
		return err;