Re: Q: proc: hold cred_guard_mutex in check_mem_permission()

Oleg Nesterov
2011-09-30T14:06:27Z

On 09/29, Stephen Wilson wrote:
>
> On Thu, Sep 29, 2011 at 01:48:27PM +0200, Oleg Nesterov wrote:
>
> > So I think we should simply remove ->cred_guard_mutex.
>
> Yes, I think that is right,

Great,

> together with removing the
> ptrace_may_access() check

Agreed, but this needs a separate patch.

Plus rcu_read_lock + ptrace_parent() should die, we simply need

task->ptrace && task->parent == current

And task_is_stopped_or_traced() should be task_is_traced(), starting
from 3.0 TASK_STOPPED && ptrace is not possible.

I'll send the patches tomorrow.

Thanks,

Oleg.