[dm-devel] [PATCH] dm.c
Kevin Corry
kevcorry at us.ibm.com
Fri May 5 13:56:43 UTC 2006
On Fri May 5 2006 8:45 am, Kevin Corry wrote:
> I haven't seen an actual patch yet for this bug, so here's one with the
> suggested fix (against 2.4.31 + device-mapper-1.02.05).
And just in case it's easier for the DM guys, here's the same fix as a patch
against linux-2.4.28-pre4-devmapper-ioctl.patch from device-mapper-1.02.05.
--
Kevin Corry
kevcorry at us.ibm.com
http://www.ibm.com/linux/
http://evms.sourceforge.net/
In dm_blk_ioctl(), change 'size' to a sector_t so we can correctly return
the size of devices between 1 and 2 TB.
Fix suggested by Eric Sandeen <sandeen at sgi.com>
http://oss.sgi.com/bugzilla/show_bug.cgi?id=646
Signed-Off-By: Kevin Corry <kevcorry at us.ibm.com>
Index: device-mapper.1.02.05/patches/linux-2.4.28-pre4-devmapper-ioctl.patch
===================================================================
--- device-mapper.1.02.05.orig/patches/linux-2.4.28-pre4-devmapper-ioctl.patch
+++ device-mapper.1.02.05/patches/linux-2.4.28-pre4-devmapper-ioctl.patch
@@ -7823,7 +7823,7 @@
+ unsigned int command, unsigned long a)
+{
+ kdev_t dev = inode->i_rdev;
-+ long size;
++ sector_t size;
+
+ switch (command) {
+ case BLKROSET:
@@ -7843,7 +7843,7 @@
+
+ case BLKGETSIZE:
+ size = volume_size(dev);
-+ if (copy_to_user((void *) a, &size, sizeof(long)))
++ if (put_user((unsigned long) size, (unsigned long *) a))
+ return -EFAULT;
+ break;
+
More information about the dm-devel
mailing list