possible bug in fs/proc/generic.c

From: Amir Noam (adnoam@zahav.net.il)
Date: Wed Dec 12 2001 - 18:00:11 EST


Hi all,

Please CC me on any reply, since I'm not subscribed to the list.

I've stumbled upon something that looks like a bug, but since I'm
fairly new
to kernel programming, it can easily be a misunderstanding on my part.

The problem is that proc_register() (in fs/proc/generic.c) can fail
(returning -EAGAIN) if there are no more free node numbers in the
/proc fs.
However, no one is actually checking the return value of
proc_remove(). The
result, as I see it, is that when trying to create a new /proc entry
while
the maximal number of entries already exist, the new entry is
successfully
allocated, but cannot be linked to the rest of the /proc entries (via
the
pointers 'parent', 'subdir', etc...), and therefore cannot be accessed
through the file system.

Furthermore, this new entry can never be de-allocated, since there is
no
match for its name in the /proc fs.

So, is this an actual bug, or am I missing something completely
obvious
here?

Thanks in advance,
Amir Noam

-
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/



This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:24 EST