From: Nicolas George Date: Wed, 19 Sep 2007 05:46:21 +0000 (-0700) Subject: uml: use correct type in BLKGETSIZE ioctl X-Git-Tag: v2.6.23-rc7~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c392a4f47f41b24432e6aa77bb5167d0bbb10c5;p=pandora-kernel.git uml: use correct type in BLKGETSIZE ioctl I found a type mismatch in UML that makes host block devices unusable as ubd devices on x86_64 and other 64 bits systems (segfault of the mm subsystem): In block/ioctl.c, the following lines show that the BLKGETSIZE ioctl expects a pointer to a long: case BLKGETSIZE: if ((bdev->bd_inode->i_size >> 9) > ~0UL) return -EFBIG; return put_ulong(arg, bdev->bd_inode->i_size >> 9); In arch/um/os-Linux/file.c, os_file_size calls it with an int. The ioctl_list man page should be fixed as well. Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed