On Mon, 2008-08-11 at 16:11 +0100, David Woodhouse wrote: > + if (get_user(start, (uint64_t __user *)(arg)) || > + get_user(len, (uint64_t __user *)(arg+8))) Hm, I don't think that works on any 32-bit platform except PowerPC. Although the patch at http://david.woodhou.se/i386-getuser8.patch might fix it for i386, if someone with access to a suitable box wants to test it for me. Still, this is probably a better plan... --- a/block/ioctl.c +++ b/block/ioctl.c @@ -323,13 +323,12 @@ int blkdev_ioctl(struct inode *inode, struct file *file, u return 0; case BLKDISCARD: { - uint64_t start, len; + uint64_t range[2]; - if (get_user(start, (uint64_t __user *)(arg)) || - get_user(len, (uint64_t __user *)(arg+8))) + if (copy_from_user(range, arg, sizeof(range))) return -EFAULT; - return blk_ioctl_discard(bdev, start, len); + return blk_ioctl_discard(bdev, range[0], range[1]); } case HDIO_GETGEO: { -- David Woodhouse Open Source Technology Centre David.Woodhouse@xxxxxxxxx Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html