Re: USB Media card - works at boot-up, removal works, re-insertdoesn't

From: David Zeuthen
Date: Thu Sep 23 2004 - 14:32:42 EST



Hi,

On Tue, 2004-09-21 at 22:48 +0100, Luke Kenneth Casson Leighton wrote:
> > To me, it seems like a severe kernel bug if a userspace process,
> > *especially* if it's unprivileged, can keep the kernel from emitting
> > hotplug remove events when a device is physically detached. It would be
> > interesting to create a minimal program to reproduce this.
>
> that's quite straightforward: i guess that an appx 30 character perl program
> or a 3 line python program 'd do the job.
>
> or just using opendir() in c, here y'go...
>

I can indeed reproduce this.

> [of course, changing it to "umount -lf" _also_ solves the
> problem by making konqueror break: result, after the first remove,
> you have to manually close konqueror, insert the media, remove
> the media card (again), reinsert it (again), re-run konqueror]
>

Even using 'umount -lf' doesn't work for me; I'm using the Fedora
Rawhide 2.6.8-1.584 kernel which is pretty close to 2.6.9-rc2-bk5. So
there we have it: unprivileged user can delay hotplug events for as long
as he likes. Yikes!

Thanks,
David

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/