Messages in this thread | | | Date | Fri, 23 Jan 2004 10:27:14 -0800 | From | Greg KH <> | Subject | Re: PATCH: (as177) Add class_device_unregister_wait() and platform_device_unregister_wait() to the driver model core |
| |
On Fri, Jan 23, 2004 at 10:19:15AM -0800, Linus Torvalds wrote: > > > On Fri, 23 Jan 2004, Greg KH wrote: > > > > > > So why would this not deadlock? > > > > It will deadlock if the user does something braindead like: > > rmmod foo < /sys/class/foo_class/foo1/file > > I don't much worry about things like that, since only root can rmmod > anyway.
Yeah, that's why I didn't care very much either.
> HOWEVER - I do worry when people start exporting interfaces that are > basically _designed_ to deadlock. It's a bad interface. Don't export it. > There is possibly just _one_ place that can do it, and it's the module > unload part. Everything else would be a bug. > > So do it in the one place. Don't make a function that does it and that > others will start using because it's "simple".
Ok, fair enough. I'll make up a patch to remove that other "unregister_wait" function in the driver core.
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |