android_kernel_motorola_sm6225/fs/9p
Zheng Bin ec41ee06e9 9p: Fix memory leak in v9fs_mount
commit cb0aae0e31c632c407a2cab4307be85a001d4d98 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-19 08:15:06 +02:00
..
acl.c 9p: acl: fix uninitialized iattr access 2019-07-03 13:14:42 +02:00
acl.h 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 2013-02-26 02:46:07 -05:00
cache.c 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie 2019-10-07 18:57:29 +02:00
cache.h fs: 9p: cache.h: Add #define of include guard 2015-11-11 02:19:50 -05:00
fid.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
fid.h 9p: use clone_fid() 2016-08-03 11:12:12 -04:00
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v9fs.c 9p: Fix memory leak in v9fs_mount 2020-08-19 08:15:06 +02:00
v9fs.h 9p locks: add mount option for lock retry interval 2019-04-20 09:16:00 +02:00
v9fs_vfs.h 9p: use inode->i_lock to protect i_size_write() under 32-bit 2019-03-23 20:09:38 +01:00
vfs_addr.c 9p: pass the correct prototype to read_cache_page 2019-07-31 07:27:08 +02:00
vfs_dentry.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
vfs_dir.c 9p: do not trust pdu content for stat item size 2019-04-20 09:16:00 +02:00
vfs_file.c 9p: avoid attaching writeback_fid on mmap with type PRIVATE 2019-10-11 18:21:13 +02:00
vfs_inode.c 9p: use inode->i_lock to protect i_size_write() under 32-bit 2019-03-23 20:09:38 +01:00
vfs_inode_dotl.c 9p: use inode->i_lock to protect i_size_write() under 32-bit 2019-03-23 20:09:38 +01:00
vfs_super.c 9p: use inode->i_lock to protect i_size_write() under 32-bit 2019-03-23 20:09:38 +01:00
xattr.c fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed 2018-08-13 09:35:16 +09:00
xattr.h 9p: xattr simplifications 2015-11-13 20:34:33 -05:00