b44.c: ->ioctl() is broken, since it uses &ifr->ifr_data instead of
ifr->ifr_data itself. Surprise, surprise, copy_from_user() on that address
doesn't do any good...
baycom_epp.c: does get_user() of the first word of structure, then
immediately does copy_from_user() on the entire thing and completely ignores
the value read by get_user() (it uses the same value in copied structure
instead). Bogus get_user() call removed.
static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
- struct mii_ioctl_data __user *data = (struct mii_ioctl_data __user *)&ifr->ifr_data;
+ struct mii_ioctl_data __user *data = ifr->ifr_data;
struct b44 *bp = netdev_priv(dev);
int err;
bc = netdev_priv(dev);
if (cmd != SIOCDEVPRIVATE)
return -ENOIOCTLCMD;
- if (get_user(cmd, (int *)ifr->ifr_data))
- return -EFAULT;
if (copy_from_user(&hi, ifr->ifr_data, sizeof(hi)))
return -EFAULT;