+ drivers-block-loopc-dont-return-garbage-if-loop_set_status-not-called.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     drivers/block/loop.c: don't return garbage if LOOP_SET_STATUS not called

has been added to the -mm tree.  Its filename is

     drivers-block-loopc-dont-return-garbage-if-loop_set_status-not-called.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: "Constantine Sapuntzakis" <csapuntz@xxxxxxxxx>

While writing a version of losetup, I ran into the problem that the loop
device was returning total garbage.

It turns out the problem was that this losetup was only issuing the
LOOP_SET_FD ioctl and not issuing a subsequent LOOP_SET_STATUS ioctl.  This
losetup didn't have any special status to set, so it left out the call.

The deeper cause is that loop_set_fd sets the transfer function to NULL,
which causes no transfer to happen lo_do_transfer.

This patch fixes the problem by setting transfer to transfer_none in
loop_set_fd.

Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/block/loop.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/block/loop.c~drivers-block-loopc-dont-return-garbage-if-loop_set_status-not-called drivers/block/loop.c
--- devel/drivers/block/loop.c~drivers-block-loopc-dont-return-garbage-if-loop_set_status-not-called	2006-05-10 01:57:20.000000000 -0700
+++ devel-akpm/drivers/block/loop.c	2006-05-10 01:57:20.000000000 -0700
@@ -818,7 +818,7 @@ static int loop_set_fd(struct loop_devic
 	lo->lo_device = bdev;
 	lo->lo_flags = lo_flags;
 	lo->lo_backing_file = file;
-	lo->transfer = NULL;
+	lo->transfer = transfer_none;
 	lo->ioctl = NULL;
 	lo->lo_sizelimit = 0;
 	lo->old_gfp_mask = mapping_gfp_mask(mapping);
_

Patches currently in -mm which might be from csapuntz@xxxxxxxxx are

drivers-block-loopc-dont-return-garbage-if-loop_set_status-not-called.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux