Re: [PATCH] rlimit: locking tidy ups

2016-05-04 Thread Oleg Nesterov
On 05/04, Eric W. Biederman wrote: > > Cc'd Oleg as he tends to be deeply involved with this class of locking. > > Mateusz Guzik writes: > > > proc_pid_limits takes ->sighand lock prior to accessing rlimits, but it > > serves no purpose as it does not prevent modifications. Well. I agree this all

Re: [PATCH] rlimit: locking tidy ups

2016-05-04 Thread Eric W. Biederman
Cc'd Oleg as he tends to be deeply involved with this class of locking. Mateusz Guzik writes: > rlimits are stored in task->signal and are guaranteed to remain valid as > long as the task struct is valid. All modifications are protected by > locking task->group_leader. Additionally changes to R

[PATCH] rlimit: locking tidy ups

2016-05-04 Thread Mateusz Guzik
rlimits are stored in task->signal and are guaranteed to remain valid as long as the task struct is valid. All modifications are protected by locking task->group_leader. Additionally changes to RLIMIT_CPU need task->sighand. do_prlimit takes tasklist_lock, which as a side effect gurantees stable -