linux/fs/fuse
Takeshi Misawa d72f70da60 fuse: Fix memory leak in fuse_dev_free()
When ntfs is unmounted, the following leak is
reported by kmemleak.

kmemleak report:

unreferenced object 0xffff880052bf4400 (size 4096):
  comm "mount.ntfs", pid 16530, jiffies 4294861127 (age 3215.836s)
  hex dump (first 32 bytes):
    00 44 bf 52 00 88 ff ff 00 44 bf 52 00 88 ff ff  .D.R.....D.R....
    10 44 bf 52 00 88 ff ff 10 44 bf 52 00 88 ff ff  .D.R.....D.R....
  backtrace:
    [<00000000bf4a2f8d>] fuse_fill_super+0xb22/0x1da0 [fuse]
    [<000000004dde0f0c>] mount_bdev+0x263/0x320
    [<0000000025aebc66>] mount_fs+0x82/0x2bf
    [<0000000042c5a6be>] vfs_kern_mount.part.33+0xbf/0x480
    [<00000000ed10cd5b>] do_mount+0x3de/0x2ad0
    [<00000000d59ff068>] ksys_mount+0xba/0xd0
    [<000000001bda1bcc>] __x64_sys_mount+0xba/0x150
    [<00000000ebe26304>] do_syscall_64+0x151/0x490
    [<00000000d25f2b42>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
    [<000000002e0abd2c>] 0xffffffffffffffff

fuse_dev_alloc() allocate fud->pq.processing.
But this hash table is not freed.

Fix this by freeing fud->pq.processing.

Signed-off-by: Takeshi Misawa <jeliantsurux@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: be2ff42c5d ("fuse: Use hash table to link processing request")
2018-12-10 09:57:54 +01:00
..
Kconfig fuse: Add posix ACL support 2016-10-01 07:32:32 +02:00
Makefile fuse: split out readdir.c 2018-09-28 16:43:23 +02:00
acl.c fuse: Support fuse filesystems outside of init_user_ns 2018-03-20 17:11:44 +01:00
control.c fuse: introduce fc->bg_lock 2018-09-28 16:43:22 +02:00
cuse.c fuse: Support fuse filesystems outside of init_user_ns 2018-03-20 17:11:44 +01:00
dev.c fuse: fix possibly missed wake-up after abort 2018-11-09 15:52:16 +01:00
dir.c fuse: fix revalidation of attributes for permission check 2018-12-03 10:14:43 +01:00
file.c fuse: fix fsync on directory 2018-12-03 10:14:43 +01:00
fuse_i.h fuse: fix fsync on directory 2018-12-03 10:14:43 +01:00
inode.c fuse: Fix memory leak in fuse_dev_free() 2018-12-10 09:57:54 +01:00
readdir.c fuse: use iversion for readdir cache verification 2018-10-01 10:07:05 +02:00
xattr.c fuse: Ensure posix acls are translated outside of init_user_ns 2018-05-31 12:26:10 +02:00