Files
twx-linux/fs
Al Viro 7a8b048430 fix cgroup_do_mount() handling of failure exits
commit 399504e21a upstream.

same story as with last May fixes in sysfs (7b745a4e40
"unfuck sysfs_mount()"); new_sb is left uninitialized
in case of early errors in kernfs_mount_ns() and papering
over it by treating any error from kernfs_mount_ns() as
equivalent to !new_ns ends up conflating the cases when
objects had never been transferred to a superblock with
ones when that has happened and resulting new superblock
had been dropped.  Easily fixed (same way as in sysfs
case).  Additionally, there's a superblock leak on
kernfs_node_dentry() failure *and* a dentry leak inside
kernfs_node_dentry() itself - the latter on probably
impossible errors, but the former not impossible to trigger
(as the matter of fact, injecting allocation failures
at that point *does* trigger it).

Cc: stable@kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 20:09:53 +01:00
..
2018-11-13 11:08:46 -08:00
2018-08-21 23:54:17 -04:00
2018-12-05 19:32:11 +01:00
2018-12-17 09:24:41 +01:00
2019-02-12 19:47:18 +01:00
2019-03-13 14:02:32 -07:00
2019-02-12 19:47:09 +01:00
2019-03-10 07:17:21 +01:00
2019-03-10 07:17:21 +01:00