public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] proc: first_tid() fix/cleanup
@ 2013-06-03 19:06 Oleg Nesterov
  2013-06-03 19:06 ` [PATCH v2 1/4] proc: first_tid: fix the potential use-after-free Oleg Nesterov
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Oleg Nesterov @ 2013-06-03 19:06 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Eric W. Biederman, Michal Hocko, Sergey Dyasly, linux-kernel

Hello.

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.

	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().

	4/4: New.

Oleg.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-06-04 21:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 0/4] proc: first_tid() fix/cleanup Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox