[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check
From: Oleg Nesterov <oleg () redhat ! com>
Date: 2016-05-31 22:53:03
Message-ID: 20160531225303.GE26582 () redhat ! com
[Download RAW message or body]
On 05/31, Michal Hocko wrote:
>
> Oleg has pointed out that can simplify both oom_adj_write and
> oom_score_adj_write even further and drop the sighand lock. The only
> purpose of the lock was to protect p->signal from going away but this
> will not happen since ea6d290ca34c ("signals: make task_struct->signal
> immutable/refcountable").
Sorry for confusion, I meant oom_adj_read() and oom_score_adj_read().
As for oom_adj_write/oom_score_adj_write we can remove it too, but then
we need to ensure (say, using cmpxchg) that unpriviliged user can not
not decrease signal->oom_score_adj_min if its oom_score_adj_write()
races with someone else (say, admin) which tries to increase the same
oom_score_adj_min.
If you think this is not a problem - I am fine with this change. But
please also update oom_adj_read/oom_score_adj_read ;)
Oleg.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic