projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03ad0d7
)
cgroup: don't put ERR_PTR() into fc->root
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 10 Nov 2019 16:53:27 +0000
(11:53 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 10 Nov 2019 16:53:27 +0000
(11:53 -0500)
the caller of ->get_tree() expects NULL left there on error...
Reported-by: Thibaut Sautereau <thibaut@sautereau.fr>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/cgroup/cgroup.c
patch
|
blob
|
history
diff --git
a/kernel/cgroup/cgroup.c
b/kernel/cgroup/cgroup.c
index 080561bb8a4b7f8ddf890bde14f6fc6a349b3585..ef4242e5d4bc6bc4bafe11e819c9652dc8d3009d 100644
(file)
--- a/
kernel/cgroup/cgroup.c
+++ b/
kernel/cgroup/cgroup.c
@@
-2119,11
+2119,12
@@
int cgroup_do_get_tree(struct fs_context *fc)
nsdentry = kernfs_node_dentry(cgrp->kn, sb);
dput(fc->root);
- fc->root = nsdentry;
if (IS_ERR(nsdentry)) {
- ret = PTR_ERR(nsdentry);
deactivate_locked_super(sb);
+ ret = PTR_ERR(nsdentry);
+ nsdentry = NULL;
}
+ fc->root = nsdentry;
}
if (!ctx->kfc.new_sb_created)