Re: [ANNOUNCE] ndevfs - a "nano" devfs

From: Greg KH
Date: Mon Jun 27 2005 - 22:50:07 EST


On Mon, Jun 27, 2005 at 08:19:19AM +0200, Arnd Bergmann wrote:
> On Freedag 24 Juni 2005 10:18, Greg KH wrote:
> > +
> > +??????????????list_for_each_entry(entry, &entries, node) {
> > +??????????????????????????????if (strcmp(name, &entry->name[0]) == 0) {
> > +??????????????????????????????????????????????dentry = entry->dentry;
> > +??????????????????????????????????????????????break;
> > +??????????????????????????????}
> > +??????????????}
>
> This list search looks like it is missing a mutex around it,

Yes.

> and the elements of the list never get freed properly.

Yeah, I noticed that after I posted it.

I was at the end of my self-imposed, "I'm only giving myself 3 hours for
this", and didn't want to touch it anymore :)

> Is it possible to use lookup_one_len() instead? That should
> make it possible not to use an extra list of entries at all.

Yeah, I originally tried a different function from namei.c, but getting
the mount point was a bit messy at the moment.

I'll take some time later this week and fix this up and post it one more
time for anyone else to use.

But remember, I'll be posting it, and not asking for it to be accepted,
as I was wrong. devfs is not needed, it's wrong, and will be removed
from the kernel. But more about that later...

thanks,

greg k-h
-
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/