diff options
author | Hewenliang <hewenliang4@huawei.com> | 2019-11-12 03:16:55 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-11-12 16:33:59 +0100 |
commit | d671fa6393d6788fc65555d4643b71cb3a361f36 (patch) | |
tree | c43826119de8184262cca1c55d08a4b6cc4fdee7 /fs/kernfs | |
parent | cgroup: freezer: don't change task and cgroups status unnecessarily (diff) | |
download | linux-d671fa6393d6788fc65555d4643b71cb3a361f36.tar.xz linux-d671fa6393d6788fc65555d4643b71cb3a361f36.zip |
kselftests: cgroup: Avoid the reuse of fd after it is deallocated
It is necessary to set fd to -1 when inotify_add_watch() fails in
cg_prepare_for_wait. Otherwise the fd which has been closed in
cg_prepare_for_wait may be misused in other functions such as
cg_enter_and_wait_for_frozen and cg_freeze_wait.
Fixes: 5313bfe425c8 ("selftests: cgroup: add freezer controller self-tests")
Signed-off-by: Hewenliang <hewenliang4@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'fs/kernfs')
0 files changed, 0 insertions, 0 deletions