alistair23-linux/fs/ceph
Luis Henriques c8d6ee0144 ceph: fix memory leak in ceph_cleanup_snapid_map()
kmemleak reports the following memory leak:

unreferenced object 0xffff88821feac8a0 (size 96):
  comm "kworker/1:0", pid 17, jiffies 4294896362 (age 20.512s)
  hex dump (first 32 bytes):
    a0 c8 ea 1f 82 88 ff ff 00 c9 ea 1f 82 88 ff ff  ................
    00 00 00 00 00 00 00 00 00 01 00 00 00 00 ad de  ................
  backtrace:
    [<00000000b3ea77fb>] ceph_get_snapid_map+0x75/0x2a0
    [<00000000d4060942>] fill_inode+0xb26/0x1010
    [<0000000049da6206>] ceph_readdir_prepopulate+0x389/0xc40
    [<00000000e2fe2549>] dispatch+0x11ab/0x1521
    [<000000007700b894>] ceph_con_workfn+0xf3d/0x3240
    [<0000000039138a41>] process_one_work+0x24d/0x590
    [<00000000eb751f34>] worker_thread+0x4a/0x3d0
    [<000000007e8f0d42>] kthread+0xfb/0x130
    [<00000000d49bd1fa>] ret_from_fork+0x3a/0x50

A kfree is missing while looping the 'to_free' list of ceph_snapid_map
objects.

Cc: stable@vger.kernel.org
Fixes: 75c9627efb ("ceph: map snapid to anonymous bdev ID")
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-03-23 13:07:08 +01:00
..
acl.c ceph: remove unnecessary assignment in ceph_pre_init_acls() 2020-01-27 16:53:39 +01:00
addr.c ceph: use release_pages() directly 2019-09-16 12:06:25 +02:00
cache.c ceph: use errorfc() and friends instead of spelling the prefix out 2020-02-07 14:48:39 -05:00
cache.h libceph, rbd, ceph: convert to use the new mount API 2019-11-27 22:28:37 +01:00
caps.c ceph: only touch the caps which have the subset mask requested 2020-01-27 16:53:39 +01:00
ceph_frag.c
debugfs.c ceph: add possible_max_rank and make the code more readable 2020-01-27 16:53:40 +01:00
dir.c ceph: print dentry offset in hex and fix xattr_version type 2020-01-27 16:53:39 +01:00
export.c ceph: move static keyword to the front of declarations 2019-09-16 12:06:25 +02:00
file.c ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL 2020-03-23 13:07:08 +01:00
inode.c ceph: don't clear I_NEW until inode metadata is fully populated 2020-01-27 16:53:39 +01:00
io.c ceph: add buffered/direct exclusionary locking for reads and writes 2019-09-16 12:06:25 +02:00
io.h ceph: add buffered/direct exclusionary locking for reads and writes 2019-09-16 12:06:25 +02:00
ioctl.c
ioctl.h
Kconfig
locks.c ceph: return -EIO if read/write against filp that lost file locks 2019-09-16 12:06:24 +02:00
Makefile ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c 2020-01-27 16:53:40 +01:00
mds_client.c We have: 2020-02-06 12:21:01 +00:00
mds_client.h ceph: close holes in structs ceph_mds_session and ceph_mds_request 2020-01-27 16:53:40 +01:00
mdsmap.c ceph: add possible_max_rank and make the code more readable 2020-01-27 16:53:40 +01:00
quota.c
snap.c ceph: fix memory leak in ceph_cleanup_snapid_map() 2020-03-23 13:07:08 +01:00
strings.c
super.c ceph: noacl mount option is effectively ignored 2020-02-11 17:04:40 +01:00
super.h ceph: canonicalize server path in place 2020-02-11 17:04:40 +01:00
util.c ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c 2020-01-27 16:53:40 +01:00
xattr.c ceph: print name of xattr in __ceph_{get,set}xattr() douts 2020-01-27 16:53:40 +01:00