* possible bug in fs/proc/generic.c
@ 2001-12-12 23:00 Amir Noam
0 siblings, 0 replies; 2+ messages in thread
From: Amir Noam @ 2001-12-12 23:00 UTC (permalink / raw)
To: linux-kernel; +Cc: adnoam
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* possible bug in fs/proc/generic.c
[not found] ` <002101c1866d$ccbbc6e0$720d4084@user>
@ 2001-12-16 20:11 ` Amir Noam
0 siblings, 0 replies; 2+ messages in thread
From: Amir Noam @ 2001-12-16 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Amir Noam
I've just noticed how horribly formatted this post came out, so I'm
sending it again. Hopefully this time it will be readable. Sorry about
that.
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-12-16 22:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-12 23:00 possible bug in fs/proc/generic.c Amir Noam
[not found] <001301c1866d$97ec7d60$720d4084@user>
[not found] ` <002101c1866d$ccbbc6e0$720d4084@user>
2001-12-16 20:11 ` Amir Noam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox