All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amir Noam" <adnoam@zahav.net.il>
To: <linux-kernel@vger.kernel.org>
Cc: <adnoam@zahav.net.il>
Subject: possible bug in fs/proc/generic.c
Date: Thu, 13 Dec 2001 01:00:11 +0200	[thread overview]
Message-ID: <000c01c18360$c1fa7400$c5e308d5@user> (raw)

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



             reply	other threads:[~2001-12-12 22:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-12 23:00 Amir Noam [this message]
     [not found] <001301c1866d$97ec7d60$720d4084@user>
     [not found] ` <002101c1866d$ccbbc6e0$720d4084@user>
2001-12-16 20:11   ` possible bug in fs/proc/generic.c Amir Noam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000c01c18360$c1fa7400$c5e308d5@user' \
    --to=adnoam@zahav.net.il \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.