Skip to contentSkip to conversation

do_mounts.c ioctl fix

PATCH New Ralf Baechle 1 participant 1 message Nov 23, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do_mounts.c ioctl fix

Hi Linus,

init/do_mounts.c is using the BLKGETSIZE ioctl which expects a pointer to an unsigned long but actually it passes a pointer to an int which of course is blowing up on 64-bit systems.

Ralf

Index: init/do_mounts.c
===================================================================
RCS file: /home/cvs/linux/init/do_mounts.c,v
retrieving revision 1.16

do_mounts.c +2 -1
diff -u -r1.16 do_mounts.c
@@ -488,7 +595,8 @@
 
 #ifdef CONFIG_BLK_DEV_RAM
 	int in_fd, out_fd;
-	int nblocks, rd_blocks, devblocks, i;
+	unsigned long rd_blocks, devblocks;
+	int nblocks, i;
 	char *buf;
 	unsigned short rotate = 0;
 #if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES)