Debian Bug report logs - #273055
kernel-image-2.6.8-1-686: user-driven unmount -l /media/usbdisk causes ioctl("/dev/sdc", BLKRRPART) to fail

version graph

Package: kernel-image-2.6.8-3-686; Maintainer for kernel-image-2.6.8-3-686 is (unknown);

Reported by: Luke Kenneth Casson Leighton <lkcl@lkcl.net>

Date: Thu, 23 Sep 2004 16:48:01 UTC

Severity: normal

Fixed in version 2.6.8-99+rm

Done: Martin Michlmayr <tbm@cyrius.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#273055; Package kernel-image-2.6.8-1-686. Full text and rfc822 format available.

Acknowledgement sent to Luke Kenneth Casson Leighton <lkcl@lkcl.net>:
New Bug report received and forwarded. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kernel-image-2.6.8-1-686: user-driven unmount -l /media/usbdisk causes ioctl("/dev/sdc", BLKRRPART) to fail
Date: Thu, 23 Sep 2004 17:42:36 +0100
Package: kernel-image-2.6.8-1-686
Severity: normal


hi herbert,

this is quite a serious bug - a user-driven action can cause
kernel-level hotplug events to not be generated.

details are here:

	http://www.uwsg.iu.edu/hypermail/linux/kernel/0409.2/1370.html

repro instructions are:

1) install hal, killall hald and run /usr/sbin/hald --verbose=yes --daemon=no
2) insert a USB floppy or a USB Media card
3) mount the floppy or media card (/media/usbdiskN)
4) compile and run this program on the above mountpoint:

	#include <stdio.h>
	#include <dirent.h>

	int main(int argc, char *argv[])
	{
	opendir(argv[1]);
	sleep(3600);
	} 
5) whilst the program in 4) is still running, REMOVE WITHOUT WARNING
   the floppy (or usb media).
   
HAL will detect the media removal and will automatically perform
a "umount -l /media/usbdiskN" system command for you.

then...

observe lots of warnings every 2 seconds from hald which are caused
by an ioctl("/dev/sdN", BLKRRPART) failing with a "Device or Resource
busy" message.

in other words, someone forgot to deal with opendirs() properly...

the above ioctl is _supposed_ to be generating hotplug events in order
for HAL to proceed to the next step.

because it does not work, HAL cannot react to hotplug events it has not
received, with the consequence that the user can never use that USB
media device again [without killing off the program, above, inserting
the media, removing it and then reinserting it which is just ridiculous].

l.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux highfield 2.6.7-selinux1 #7 Wed Sep 8 17:46:33 BST 2004 i686
Locale: LANG=C, LC_CTYPE=C




Bug reassigned from package `kernel-image-2.6.8-1-686' to `kernel-image-2.6.8-2-686'. Request was from Martin Michlmayr <tbm@cyrius.com> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `kernel-image-2.6.8-2-686' to `kernel-image-2.6.8-3-686'. Request was from Martin Michlmayr <tbm@cyrius.com> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Martin Michlmayr <tbm@cyrius.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Luke Kenneth Casson Leighton <lkcl@lkcl.net>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #14 received at 273055-done@bugs.debian.org (full text, mbox):

From: Martin Michlmayr <tbm@cyrius.com>
To: 273055-done@bugs.debian.org
Subject: Kernel from Debian 3.1 no longer supported
Date: Fri, 20 Jun 2008 17:09:43 +0200
Version: 2.6.8-99+rm

You reported a bug against the Linux kernel (version 2.6.8) that was
shipped with Debian 3.1 (sarge).  Since Debian 3.1 is no longer
supported and the kernel has changed so much that it would be very
difficult to verify every outstanding bug from 2.6.8, I'm hereby
closing your bug report.

If you still see this issue with the kernel from the upcoming release
of Debian (lenny, version 5.0), then please me know and I'll be happy
to reopen this bug report.

Thanks.

-- 
Martin Michlmayr
http://www.cyrius.com/




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 11 Aug 2008 08:10:19 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 16:47:48 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.