Re: [PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Dan Carpenter
On Thu, Dec 10, 2015 at 10:42:14AM +0100, Wim de With wrote: > On 10-12-2015 10:37, Dan Carpenter wrote: > > On Thu, Dec 10, 2015 at 10:11:12AM +0100, Wim de With wrote: > >> @@ -482,8 +483,16 @@ static int gdm_wimax_ioctl(struct net_device *dev, > >> struct ifreq *ifr, int cmd) > >>

Re: [PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Wim de With
On 10-12-2015 10:37, Dan Carpenter wrote: > On Thu, Dec 10, 2015 at 10:11:12AM +0100, Wim de With wrote: >> @@ -482,8 +483,16 @@ static int gdm_wimax_ioctl(struct net_device *dev, >> struct ifreq *ifr, int cmd) >> /* NOTE: gdm_update_fsm should be called >>

Re: [PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Dan Carpenter
On Thu, Dec 10, 2015 at 10:11:12AM +0100, Wim de With wrote: > @@ -482,8 +483,16 @@ static int gdm_wimax_ioctl(struct net_device *dev, > struct ifreq *ifr, int cmd) > /* NOTE: gdm_update_fsm should be called >* before gdm_wimax_ioctl_se

[PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Wim de With
This fixes the sparse warnings about dereferencing a userspace pointer. However, gdm_wimax_ioctl_get_data and gdm_wimax_ioctl_set_data both carefully check whether the pointers and data are valid, gdm_update_fsm does not. It simply casts userspace data to struct fsm_s. I haven't fixed this, and am