From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>,
Chris Wright <chrisw@sous-sol.org>,
Eric Paris <eparis@redhat.com>, James Morris <jmorris@namei.org>,
Roland McGrath <roland@redhat.com>,
Stephen Smalley <sds@tycho.nsa.gov>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH -mm] do_wait-fix-security-checks-fix
Date: Tue, 27 Nov 2007 20:50:53 +0300 [thread overview]
Message-ID: <20071127175053.GA9569@tv-sign.ru> (raw)
In-Reply-To: <20071124153323.GA6696@tv-sign.ru>
On 11/24, Oleg Nesterov wrote:
>
> - if (!flag) {
> + if (flag)
> + continue;
This "last obvious cleanup right before sending the patch" is terribly wrong,
we can't continue, we must advance the tsk to the next_thread().
Please apply.
--- PT/kernel/exit.c~SEC_FIX 2007-11-26 17:10:41.000000000 +0300
+++ PT/kernel/exit.c 2007-11-27 20:41:10.000000000 +0300
@@ -1527,16 +1527,17 @@ repeat:
if (retval != 0) /* tasklist_lock released */
goto end;
}
- if (flag)
- continue;
- list_for_each_entry(p, &tsk->ptrace_children, ptrace_list) {
- flag = eligible_child(pid, options, p);
- if (!flag)
- continue;
- if (likely(flag > 0))
- break;
- retval = flag;
- goto end;
+ if (!flag) {
+ list_for_each_entry(p, &tsk->ptrace_children,
+ ptrace_list) {
+ flag = eligible_child(pid, options, p);
+ if (!flag)
+ continue;
+ if (likely(flag > 0))
+ break;
+ retval = flag;
+ goto end;
+ }
}
if (options & __WNOTHREAD)
break;
prev parent reply other threads:[~2007-11-27 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-24 15:33 [RFC, PATCH -mm] do_wait: fix security checks Oleg Nesterov
2007-11-27 17:50 ` Oleg Nesterov [this message]
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=20071127175053.GA9569@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=eparis@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=sds@tycho.nsa.gov \
/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®