Bug#290398: usb_storage issue: A (not so) funny way to (or to not) delete files.
Hi,
Daniele P. wrote:
> Subject: usb_storage issue: A (not so) funny way to (or to not)
delete > files.
> Package: kernel-image-2.6.8-1-386
> Version: 2.6.8-10
> Severity: grave
This seems excessive to me, see below.
> 2) Usb storage device physically set to read only
>
> 3) Mount it as rw (mount -o rw /dev/sdc1 /media/usb), file system is
vfat.
>
> 4) mv my_favorite_file /media/usb && echo success
> success
>
> 5) And there was much rejoicing (!)
All right, the correct behavior would be that the kernel warns you and
then mounts the device read-only instead of rw, as the mdk kernel does.
The code for doing this is set up by configuring
CONFIG_USB_STORAGE_RW_DETECT before compiling the kernel.
However, this code is considered experimental upstream, and has been
disabled in debian in kernel-image-2.6.8-i386 version 2.6.8-4 and later,
because it was believed this would help with bug #268184. In the end, it
turns out that bug #268184 is caused by something else, so unless I
missed some info, CONFIG_USB_STORAGE_RW_DETECT could be safely reenabled.
You can check if you get the correct behavior with a kernel where
CONFIG_USB_STORAGE_RW_DETECT is enabled (for example
http://snapshot.debian.net/archive/2004/10/09/debian/pool/main/k/kernel-image-2.6.8-i386/kernel-image-2.6.8-1-386_2.6.8-3_i386.deb
or by compiling your own).
[ note for the maintainer: according to the kernel doc, hardware failing
with CONFIG_USB_STORAGE_RW_DETECT should be reported to upstream
(usb-storage@lists.one-eyed-alien.net), so that the check can be
selectively disabled for them. I think they are added to the file
linux/drivers/usb/storage/unusual_devs.h ]
IMHO the grave severity is a bit overblown for this bug. Sure, it causes
data loss, but only indirectly and through a mistake of the user. The
same behavior has existed all along the 2.4 kernel series, and people
live with that.
Also, having to recompile the kernels at this point of time could
severely hinder the release, which does not seem worth it. If you agree
with this analysis, please downgrade the bug to important, and/or
reassign it to kernel-image-2.6.10-1-386 so that it can be taken care of
in unstable without hindering Sarge.
Thanks,
BC
Reply to: