sunrpc: fix error path in module_init
register_rpc_pipefs() needs to clean up rpc_inode_cache by kmem_cache_destroy() on register_filesystem() failure. init_sunrpc() needs to unregister rpc_pipe_fs by unregister_rpc_pipefs() when rpc_init_mempool() returns error. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Neil Brown <neilb@suse.de> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

کامیت شده توسط
Linus Torvalds

والد
cd123012d9
کامیت
5bd5f5812b
@@ -146,9 +146,11 @@ init_sunrpc(void)
|
||||
int err = register_rpc_pipefs();
|
||||
if (err)
|
||||
goto out;
|
||||
err = rpc_init_mempool() != 0;
|
||||
if (err)
|
||||
err = rpc_init_mempool();
|
||||
if (err) {
|
||||
unregister_rpc_pipefs();
|
||||
goto out;
|
||||
}
|
||||
#ifdef RPC_DEBUG
|
||||
rpc_register_sysctl();
|
||||
#endif
|
||||
|
مرجع در شماره جدید
Block a user