* Re: [PATCH] check copy_from_user return value in rtl8712
[not found] <20110306142414.GA19990@chii>
@ 2011-03-06 16:45 ` Larry Finger
0 siblings, 0 replies; only message in thread
From: Larry Finger @ 2011-03-06 16:45 UTC (permalink / raw)
To: Xiaochen Wang; +Cc: greg, florian.c.schilhabel, lkml
On 03/06/2011 08:24 AM, Xiaochen Wang wrote:
> Description:return -EFAULT if copy_to_user() fails
>
> Signed-off-by: Xiaochen Wang<wangxiaochen0@gmail.com>
> ---
> drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> index 685a7b1..8a8e682 100644
> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> @@ -1965,9 +1965,9 @@ static int r871x_wps_start(struct net_device *dev,
> struct _adapter *padapter = (struct _adapter *)_netdev_priv(dev);
> struct iw_point *pdata =&wrqu->data;
> u32 u32wps_start = 0;
> - unsigned int uintRet = 0;
>
> - uintRet = copy_from_user((void *)&u32wps_start, pdata->pointer, 4);
> + if (copy_from_user((void *)&u32wps_start, pdata->pointer, 4))
> + return -EFAULT;
> if ((padapter->bDriverStopped) || (pdata == NULL))
> return -EINVAL;
> if (u32wps_start == 0)
ACK.
Larry
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-06 16:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110306142414.GA19990@chii>
2011-03-06 16:45 ` [PATCH] check copy_from_user return value in rtl8712 Larry Finger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.