From: "홍신 shin hong" <hongshin@gmail.com>
To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: data race in remove_proc_entry()
Date: Wed, 4 Feb 2009 00:40:59 +0900 [thread overview]
Message-ID: <2014bcab0902030740y115b6179gb5c6ad5f1f2d994@mail.gmail.com> (raw)
Hi. I found a suspected bug in proc file system
At proc/generic.c line 806, de->subdir is not protected by
spin_lock(&proc_subdir_lock)
so that data races might occur.
Line 806 must be protected by spin_lock(&proc_subdir_lock) to avoid data race.
WARN(condition , stmt) is translated into if (condition) { stmt }.
At line 806, a context switching can happen right after the condition checking
and another thread may set 'de->subdir' as a null.
In this case, the execution of 'stmt' would occur null pointer dereference error
since it has 'de->subdir->name'.
Sincerely,
Shin Hong
M.S. Candidate
Computer Science Div., EECS Dept.,
Korea Advanced Institute of Sci. & Tech.,
Republic of Korea
reply other threads:[~2009-02-03 15:41 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=2014bcab0902030740y115b6179gb5c6ad5f1f2d994@mail.gmail.com \
--to=hongshin@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).