[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 17 Aug 2007 15:43:40 -0400
From: Jeff Dike <jdike@...toit.com>
To: Andrew Morton <akpm@...l.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
uml-devel <user-mode-linux-devel@...ts.sourceforge.net>,
Nicolas George <nicolas.george@...malesup.org>
Subject: [PATCH 2/6] UML - Use 64-bits for block size on x86_64
The BLKGETSIZE ioctl expects a pointer to a long, os_file_size was providing
an int. Therefore, ubd access to host block devices caused a segmentation
fault on 64 bits systems.
Signed-off-by: Nicolas George <nicolas.george@...malesup.org>
Signed-off-by: Jeff Dike <jdike@...ux.intel.com>
--
arch/um/os-Linux/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6.22/arch/um/os-Linux/file.c
===================================================================
--- linux-2.6.22.orig/arch/um/os-Linux/file.c 2007-08-17 13:36:35.000000000 -0400
+++ linux-2.6.22/arch/um/os-Linux/file.c 2007-08-17 13:37:55.000000000 -0400
@@ -296,7 +296,8 @@ int os_file_size(char *file, unsigned lo
}
if(S_ISBLK(buf.ust_mode)){
- int fd, blocks;
+ int fd;
+ long blocks;
fd = os_open_file(file, of_read(OPENFLAGS()), 0);
if(fd < 0){
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists