public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@ZenIV.linux.org.uk>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Michal Hocko <mhocko@suse.cz>, Sergey Dyasly <dserrg@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] proc: first_tid() fix/cleanup
Date: Tue, 4 Jun 2013 19:32:52 +0200	[thread overview]
Message-ID: <20130604173252.GA22223@redhat.com> (raw)
In-Reply-To: <20130603190640.GA11481@redhat.com>

Andrew,

On 06/03, Oleg Nesterov wrote:
>
> next_thread() should be avoided, probably next_tid() is the
> only "valid" user.
>
> But now we have another reason to avoid (and probably even kill)
> it, we are going to replace or fix while_each_thread(), almost
> every lockless usage is wrong.
>
> Changes:
>
> 	1/4: Update the changelog, do not move the comment.
>
> 	2/4: No changes.

So these two are fine, but please ignore 3 and 4.

> 	3/4: Update the comment following the explanations from
> 	     Eric.
>
> 	     Eric pointed that get_proc_task() without rcu lock
> 	     can trigger the (bogus) warning. Extract the similar
> 	     check from pid_delete_dentry() into the new helper
> 	     and use it instead.
>
> 	     I didn't dare to preserve his ack, but the only change
> 	     is the new proc_inode_is_dead() helper and
>
> 		- if (pid_task(proc_pid(inode))
> 		+ if (proc_inode_is_dead(inode))
>
> 	     in proc_task_readdir().

Looks like a good cleanup and it was acked, but conflicts (textually)
with viro/vfs.git#experimental.

> 	4/4: New.

Should be updated and conflicts too.

Oleg.


      parent reply	other threads:[~2013-06-04 17:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 19:06 [PATCH v2 0/4] proc: first_tid() fix/cleanup Oleg Nesterov
2013-06-03 19:06 ` [PATCH v2 1/4] proc: first_tid: fix the potential use-after-free Oleg Nesterov
2013-06-03 19:07 ` [PATCH v2 2/4] proc: change first_tid() to use while_each_thread() Oleg Nesterov
2013-06-03 19:07 ` [PATCH v2 3/4] proc: simplify proc_task_readdir/first_tid paths Oleg Nesterov
2013-06-03 22:06   ` Eric W. Biederman
2013-06-03 19:07 ` [PATCH v2 4/4] proc: avoid ->f_pos overflows in proc_task_readdir() paths Oleg Nesterov
2013-06-03 22:18   ` Eric W. Biederman
2013-06-04 17:14     ` Oleg Nesterov
2013-06-04 17:39       ` Al Viro
2013-06-04 19:57         ` Oleg Nesterov
2013-06-04 21:06           ` Al Viro
2013-06-04  0:58   ` Al Viro
2013-06-04 17:35     ` Oleg Nesterov
2013-06-04 17:32 ` 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=20130604173252.GA22223@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dserrg@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --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