diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-23 12:53:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-01 17:18:49 +0300 |
commit | 9d64d2405f7d30d49818f6682acd0392348f0fdb (patch) | |
tree | 6d8cb5c4bbb9f09467672410dec0ce8fadf8c8fe /drivers/misc/bcm-vk | |
parent | eaf271ea844b8dea5256bd3c73e642ef13ce68a2 (diff) | |
download | linux-9d64d2405f7d30d49818f6682acd0392348f0fdb.tar.xz |
binderfs: rework superblock destruction
So far we relied on
.put_super = binderfs_put_super()
to destroy info we stashed in sb->s_fs_info. This gave us the required ordering
between ->evict_inode() and sb->s_fs_info destruction.
But the current implementation of binderfs_fill_super() has a memory leak in
the rare circumstance that d_make_root() fails because ->put_super() is only
called when sb->s_root is initialized. Fix this by removing ->put_super() and
simply do all that work in binderfs_kill_super().
Reported-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Link: https://lore.kernel.org/r/20220823095339.853371-1-brauner@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/bcm-vk')
0 files changed, 0 insertions, 0 deletions