Skip to content

Commit 2ce1007

Browse files
Ye BinSteve French
authored andcommitted
cifs: fix warning when destroy 'cifs_io_request_pool'
There's a issue as follows: WARNING: CPU: 1 PID: 27826 at mm/slub.c:4698 free_large_kmalloc+0xac/0xe0 RIP: 0010:free_large_kmalloc+0xac/0xe0 Call Trace: <TASK> ? __warn+0xea/0x330 mempool_destroy+0x13f/0x1d0 init_cifs+0xa50/0xff0 [cifs] do_one_initcall+0xdc/0x550 do_init_module+0x22d/0x6b0 load_module+0x4e96/0x5ff0 init_module_from_file+0xcd/0x130 idempotent_init_module+0x330/0x620 __x64_sys_finit_module+0xb3/0x110 do_syscall_64+0xc1/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Obviously, 'cifs_io_request_pool' is not created by mempool_create(). So just use mempool_exit() to revert 'cifs_io_request_pool'. Fixes: edea94a ("cifs: Add mempools for cifs_io_request and cifs_io_subrequest structs") Signed-off-by: Ye Bin <yebin10@huawei.com> Acked-by: David Howells <dhowells@redhat.com Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 9a5dd61 commit 2ce1007

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/cifsfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,7 @@ static int cifs_init_netfs(void)
17801780
nomem_subreqpool:
17811781
kmem_cache_destroy(cifs_io_subrequest_cachep);
17821782
nomem_subreq:
1783-
mempool_destroy(&cifs_io_request_pool);
1783+
mempool_exit(&cifs_io_request_pool);
17841784
nomem_reqpool:
17851785
kmem_cache_destroy(cifs_io_request_cachep);
17861786
nomem_req:

0 commit comments

Comments
 (0)