From: Dawson Engler <engler@csl.stanford.edu>
To: linux-kernel@vger.kernel.org
Cc: engler@csl.stanford.edu (Dawson Engler)
Subject: [CHECKER] race in 2.5.62/fs/exec.c?
Date: Sat, 22 Mar 2003 11:40:48 -0800 (PST) [thread overview]
Message-ID: <200303221940.h2MJeml23812@csl.stanford.edu> (raw)
I'm not sure if I'm missing something --- is the following a race?
2.5.62/fs/exec.c:1013:search_binary_handler:
read_unlock(&binfmt_lock);
retval = fn(bprm, regs);
if (retval >= 0) {
put_binfmt(fmt);
binfmt_lock is released and then put_binfmt is called. put_binfmt
seems to need locking:
fs/exec.c:1022:search_binary_handle
read_lock(&binfmt_lock);
put_binfmt(fmt);
if (retval != -ENOEXEC)
break;
if (!bprm->file) {
read_unlock(&binfmt_lock);
return retval;
}
2.5.62/fs/exec.c:151:sys_uselib:
error = fmt->load_shlib(file);
read_lock(&binfmt_lock);
put_binfmt(fmt);
if (error != -ENOEXEC)
break;
}
Are these other locks redundant? Or does put_binfmt need protection?
next reply other threads:[~2003-03-22 19:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-22 19:40 Dawson Engler [this message]
2003-03-22 21:45 ` Andrew Morton
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=200303221940.h2MJeml23812@csl.stanford.edu \
--to=engler@csl.stanford.edu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®