Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] devio __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Al Viro and committed by
Linus Torvalds
c714de5d cb04e6b6

+3 -3
+3 -3
drivers/usb/core/devio.c
··· 1216 1216 { 1217 1217 struct usbdevfs_urb uurb; 1218 1218 1219 - if (get_urb32(&uurb,(struct usbdevfs_urb32 *)arg)) 1219 + if (get_urb32(&uurb,(struct usbdevfs_urb32 __user *)arg)) 1220 1220 return -EFAULT; 1221 1221 1222 1222 return proc_do_submiturb(ps, &uurb, ((struct usbdevfs_urb32 __user *)arg)->iso_frame_desc, arg); ··· 1251 1251 } 1252 1252 1253 1253 free_async(as); 1254 - if (put_user((u32)(u64)addr, (u32 __user *)arg)) 1254 + if (put_user(ptr_to_compat(addr), (u32 __user *)arg)) 1255 1255 return -EFAULT; 1256 1256 return 0; 1257 1257 } ··· 1520 1520 1521 1521 case USBDEVFS_IOCTL32: 1522 1522 snoop(&dev->dev, "%s: IOCTL\n", __FUNCTION__); 1523 - ret = proc_ioctl_compat(ps, (compat_uptr_t)(long)p); 1523 + ret = proc_ioctl_compat(ps, ptr_to_compat(p)); 1524 1524 break; 1525 1525 #endif 1526 1526