All of lore.kernel.org
 help / color / mirror / Atom feed
From: wiebittewas <wiebittewas@googlemail.com>
To: linux-kernel@vger.kernel.org
Subject: 3.10.27: BUG on accessing /proc under high load
Date: Sun, 19 Jan 2014 18:59:14 +0100	[thread overview]
Message-ID: <52DC1272.1020005@gmail.com> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=68991

because http://kernelnewbies.org/FoundBug says, a bug-msg should be
created in bugzilla as well as send to this list, I just follow this...

currently I don't have the time for this list, so please do a CC to me.

when doing a find /proc -type f -exec sha512sum {} \; x-hundred times
parallel, this can lead in a BUG within d_path.

as I can see in the oops and the objdump (filed at bugzilla), the
problems occurs in fs/dcache.c:d_path(), testing for existance of a
function and then calling it:

if (path->dentry->d_op && path->dentry->d_op->d_dname)
   return path->dentry->d_op->d_dname(path->dentry, buf, buflen);

looking at fs/proc/base.c:proc_pid_readlink() "path" is initialized in
one of the getlink-functions within proc.c: proc_cwd_link() or
proc_root_link()

in both functions first the task-structure is get by get_roc_task() and
if 's not NULL, then locked and then the wanted fs_struct is
acquired/locked.

now I don't have enough experience, but maybe beetween getting the
task-struct and locking it, the task may be already invalidated because
it exited, so the lock should be done in get_proc_task() or at least it
should be checked after locking, if the task is still alive....???


                 reply	other threads:[~2014-01-19 17:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=52DC1272.1020005@gmail.com \
    --to=wiebittewas@googlemail.com \
    --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.