Unverified Commit 1d1a7e25 authored by Ye Bin's avatar Ye Bin Committed by Konstantin Komarov
Browse files

fs/ntfs3: Fix 'proc_info_root' leak when init ntfs failed



There's a issue as follows:
  proc_dir_entry 'fs/ntfs3' already registered
  WARNING: CPU: 3 PID: 9788 at fs/proc/generic.c:375 proc_register+0x418/0x590
  Modules linked in: ntfs3(E+)
  Call Trace:
   <TASK>
   _proc_mkdir+0x165/0x200
   init_ntfs_fs+0x36/0xf90 [ntfs3]
   do_one_initcall+0x115/0x6c0
   do_init_module+0x253/0x760
   load_module+0x55f2/0x6c80
   init_module_from_file+0xd2/0x130
   __x64_sys_finit_module+0xbf/0x130
   do_syscall_64+0x72/0x1c0

Above issue happens as missing destroy 'proc_info_root' when error
happens after create 'proc_info_root' in init_ntfs_fs().
So destroy 'proc_info_root' in error path in init_ntfs_fs().

Fixes: 7832e123 ("fs/ntfs3: Add support /proc/fs/ntfs3/<dev>/volinfo and /proc/fs/ntfs3/<dev>/label")
Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent c5a39629
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment