mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-22 12:21:00 +02:00
Revert "media: drivers/media/dvb-core: copy user arrays safely"
This reverts commit 04e8cbcdad
.
This commit is contained in:
@@ -2163,8 +2163,7 @@ static int dvb_frontend_handle_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
if (!tvps->num || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
||||
return -EINVAL;
|
||||
|
||||
tvp = memdup_array_user(compat_ptr(tvps->props),
|
||||
tvps->num, sizeof(*tvp));
|
||||
tvp = memdup_user(compat_ptr(tvps->props), tvps->num * sizeof(*tvp));
|
||||
if (IS_ERR(tvp))
|
||||
return PTR_ERR(tvp);
|
||||
|
||||
@@ -2195,8 +2194,7 @@ static int dvb_frontend_handle_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
if (!tvps->num || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
||||
return -EINVAL;
|
||||
|
||||
tvp = memdup_array_user(compat_ptr(tvps->props),
|
||||
tvps->num, sizeof(*tvp));
|
||||
tvp = memdup_user(compat_ptr(tvps->props), tvps->num * sizeof(*tvp));
|
||||
if (IS_ERR(tvp))
|
||||
return PTR_ERR(tvp);
|
||||
|
||||
@@ -2376,8 +2374,7 @@ static int dvb_get_property(struct dvb_frontend *fe, struct file *file,
|
||||
if (!tvps->num || tvps->num > DTV_IOCTL_MAX_MSGS)
|
||||
return -EINVAL;
|
||||
|
||||
tvp = memdup_array_user((void __user *)tvps->props,
|
||||
tvps->num, sizeof(*tvp));
|
||||
tvp = memdup_user((void __user *)tvps->props, tvps->num * sizeof(*tvp));
|
||||
if (IS_ERR(tvp))
|
||||
return PTR_ERR(tvp);
|
||||
|
||||
@@ -2455,8 +2452,7 @@ static int dvb_frontend_handle_ioctl(struct file *file,
|
||||
if (!tvps->num || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
||||
return -EINVAL;
|
||||
|
||||
tvp = memdup_array_user((void __user *)tvps->props,
|
||||
tvps->num, sizeof(*tvp));
|
||||
tvp = memdup_user((void __user *)tvps->props, tvps->num * sizeof(*tvp));
|
||||
if (IS_ERR(tvp))
|
||||
return PTR_ERR(tvp);
|
||||
|
||||
|
Reference in New Issue
Block a user