linux/fs/f2fs
Chao Yu 04f9287ab3 f2fs: fix to avoid discard command leak
=============================================================================
 BUG discard_cmd (Tainted: G    B      OE  ): Objects remaining in discard_cmd on __kmem_cache_shutdown()
 -----------------------------------------------------------------------------

 INFO: Slab 0xffffe1ac481d22c0 objects=36 used=2 fp=0xffff936b4748bf50 flags=0x2ffff0000000100
 Call Trace:
  dump_stack+0x63/0x87
  slab_err+0xa1/0xb0
  __kmem_cache_shutdown+0x183/0x390
  shutdown_cache+0x14/0x110
  kmem_cache_destroy+0x195/0x1c0
  f2fs_destroy_segment_manager_caches+0x21/0x40 [f2fs]
  exit_f2fs_fs+0x35/0x641 [f2fs]
  SyS_delete_module+0x155/0x230
  ? vtime_user_exit+0x29/0x70
  do_syscall_64+0x6e/0x160
  entry_SYSCALL64_slow_path+0x25/0x25

 INFO: Object 0xffff936b4748b000 @offset=0
 INFO: Object 0xffff936b4748b070 @offset=112
 kmem_cache_destroy discard_cmd: Slab cache still has objects
 Call Trace:
  dump_stack+0x63/0x87
  kmem_cache_destroy+0x1b4/0x1c0
  f2fs_destroy_segment_manager_caches+0x21/0x40 [f2fs]
  exit_f2fs_fs+0x35/0x641 [f2fs]
  SyS_delete_module+0x155/0x230
  do_syscall_64+0x6e/0x160
  entry_SYSCALL64_slow_path+0x25/0x25

Recovery can cache discard commands, so in error path of fill_super(),
we need give a chance to handle them, otherwise it will lead to leak
of discard_cmd slab cache.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-08-23 07:57:11 -07:00
..
acl.c f2fs: Replace spaces with tab 2019-05-08 21:23:11 -07:00
acl.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
checkpoint.c f2fs: add a rw_sem to cover quota flag changes 2019-07-02 15:40:41 -07:00
data.c f2fs: fix panic of IO alignment feature 2019-08-23 07:57:10 -07:00
debug.c f2fs: ioctl for removing a range from F2FS 2019-07-02 15:39:24 -07:00
dir.c f2fs: use generic EFSBADCRC/EFSCORRUPTED 2019-07-02 15:40:41 -07:00
extent_cache.c f2fs: introduce f2fs_<level> macros to wrap f2fs_printk() 2019-07-02 15:40:40 -07:00
f2fs.h f2fs: support swap file w/ DIO 2019-07-03 08:52:54 -07:00
file.c f2fs: remove redundant check from f2fs_setflags_common() 2019-07-12 19:39:07 -07:00
gc.c f2fs: fix to read source block before invalidating it 2019-07-26 17:49:04 -07:00
gc.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
hash.c f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
inline.c f2fs: use generic EFSBADCRC/EFSCORRUPTED 2019-07-02 15:40:41 -07:00
inode.c f2fs: fix to avoid tagging SBI_QUOTA_NEED_REPAIR incorrectly 2019-08-23 07:57:11 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
namei.c f2fs: introduce f2fs_<level> macros to wrap f2fs_printk() 2019-07-02 15:40:40 -07:00
node.c f2fs: use generic EFSBADCRC/EFSCORRUPTED 2019-07-02 15:40:41 -07:00
node.h f2fs: check PageWriteback flag for ordered case 2018-12-26 15:16:56 -08:00
recovery.c f2fs: use generic EFSBADCRC/EFSCORRUPTED 2019-07-02 15:40:41 -07:00
segment.c f2fs: fix to avoid discard command leak 2019-08-23 07:57:11 -07:00
segment.h f2fs: use generic EFSBADCRC/EFSCORRUPTED 2019-07-02 15:40:41 -07:00
shrinker.c f2fs: fix sbi->extent_list corruption issue 2018-12-26 15:16:54 -08:00
super.c f2fs: fix to drop meta/node pages during umount 2019-08-23 07:57:10 -07:00
sysfs.c f2fs: avoid get_valid_blocks() for cleanup 2019-07-02 15:40:40 -07:00
trace.c f2fs: do not use mutex lock in atomic context 2019-03-05 19:58:06 -08:00
trace.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
xattr.c f2fs: set SBI_NEED_FSCK for xattr corruption case 2019-07-02 15:40:41 -07:00
xattr.h f2fs: fix to avoid accessing xattr across the boundary 2019-05-09 09:43:29 -07:00