Subject: Re: what device removal options are unsafe? cardbus->usb->disk looks to panic!
To: George Michaelson <email@example.com>
From: Steven M. Bellovin <firstname.lastname@example.org>
Date: 10/14/2003 21:22:38
In message <email@example.com>, George Michaelson writes:
>I removed a USB 2.0 cardbus card, with device still attached by cable. the dis
>had not been mounted in user FS space, but had been probed and attached to SCS
>via atapibus/umass mappings. this caused a panic. my memory tells me that even
>on 4.2 on vaxen, arbitrary removal of disks was sometimes a bit painful for a
>kernel. Is this still true?
>Should I have detached the sd* device by removing the USB cable first? Is ther
>some userspace trick which can make it 'safe' to yank a controller with attach
>devices and not panic a kernel?
>I have a vestigial fear that I can't remove the cardbus card if I've ever
>mounted a disk via that card, which is a bit different. (I remember seeing thi
>also panic some time ago this year)
I raised a similar issue quite a while ago -- my problem was a PCMCIA
SCSI controller. The answer at the time was that since there's no way
to speak of a controller directly at user level, there was no way to
"close" it, and hence no way to remove the card safely. I don't recall
seeing any fixes that address it, but since I haven't used the card in
a long time I haven't worried about it.
--Steve Bellovin, http://www.research.att.com/~smb