Files
linux/fs/9p
Zheng Bin 1178d7cd19 9p: Fix memory leak in v9fs_mount
commit cb0aae0e31 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>
2023-05-16 08:47:30 +09:00
..
2023-05-15 13:55:50 +09:00
2016-08-03 11:12:12 -04:00
2016-08-03 11:12:12 -04:00
2015-11-13 20:34:33 -05:00
2023-05-16 08:47:30 +09:00
2015-11-13 20:34:33 -05:00