kernel-hacking-2024-linux-s.../fs/9p
Zheng Bin cb0aae0e31 9p: Fix memory leak in v9fs_mount
v9fs_mount
  v9fs_session_init
    v9fs_cache_session_get_cookie
      v9fs_random_cachetag                     -->alloc cachetag
      v9ses->fscache = fscache_acquire_cookie  -->maybe NULL
  sb = sget                                    -->fail, goto clunk
clunk_fid:
  v9fs_session_close
    if (v9ses->fscache)                        -->NULL
      kfree(v9ses->cachetag)

Thus memleak happens.

Link: http://lkml.kernel.org/r/20200615012153.89538-1-zhengbin13@huawei.com
Fixes: 60e78d2c99 ("9p: Add fscache support to 9p")
Cc: <stable@vger.kernel.org> # v2.6.32+
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
2020-07-19 14:58:47 +02:00
..
acl.c 9p: acl: fix uninitialized iattr access 2018-09-08 01:51:50 +09:00
acl.h
cache.c 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie 2019-09-03 11:07:39 +00:00
cache.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
fid.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
fid.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
Kconfig 9p: Fix Kconfig indentation 2020-03-27 09:29:56 +00:00
Makefile
v9fs.c 9p: Fix memory leak in v9fs_mount 2020-07-19 14:58:47 +02:00
v9fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
v9fs_vfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
vfs_addr.c 9p: pass the correct prototype to read_cache_page 2019-07-12 11:05:43 -07:00
vfs_dentry.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
vfs_dir.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
vfs_file.c 9p: read only once on O_NONBLOCK 2020-03-27 09:29:56 +00:00
vfs_inode.c 9p: retrieve fid from file when file instance exist. 2020-07-19 14:58:47 +02:00
vfs_inode_dotl.c 9p: retrieve fid from file when file instance exist. 2020-07-19 14:58:47 +02:00
vfs_super.c 9p pull request for inclusion in 5.4 2019-09-27 15:10:34 -07:00
xattr.c iov_iter: Separate type from direction and use accessor functions 2018-10-24 00:41:07 +01:00
xattr.h