diff options
author | Xiu Jianfeng <xiujianfeng@huawei.com> | 2024-07-30 05:29:20 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2024-07-31 00:13:19 +0200 |
commit | d72a00a8485d1cb11ac1a57bf89b02cbd3a405bf (patch) | |
tree | 6bba6e6e3746edb9350b0b283b7b3d36abc1d567 /kernel/fork.c | |
parent | cgroup/cpuset: remove child_ecpus_count (diff) | |
download | linux-d72a00a8485d1cb11ac1a57bf89b02cbd3a405bf.tar.xz linux-d72a00a8485d1cb11ac1a57bf89b02cbd3a405bf.zip |
cgroup/pids: Avoid spurious event notification
Currently when a process in a group forks and fails due to it's
parent's max restriction, all the cgroups from 'pids_forking' to root
will generate event notifications but only the cgroups from
'pids_over_limit' to root will increase the counter of PIDCG_MAX.
Consider this scenario: there are 4 groups A, B, C,and D, the
relationships are as follows, and user is watching on C.pids.events.
root->A->B->C->D
When a process in D forks and fails due to B.max restriction, the
user will get a spurious event notification because when he wakes up
and reads C.pids.events, he will find that the content has not changed.
To address this issue, only the cgroups from 'pids_over_limit' to root
will have their PIDCG_MAX counters increased and event notifications
generated.
Fixes: 385a635cacfe ("cgroup/pids: Make event counters hierarchical")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/fork.c')
0 files changed, 0 insertions, 0 deletions