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

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

 



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.

-Costa

Attachment: loop-fix-set-fd.diff
Description: Binary data


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux