TencentOS-kernel/net/sunrpc
Fuhai Wang 6e3844c591 nsfs: fix netns proc warning
There are two issues in commit a0210fd669343660fc7481f2f422439dba19336c(auth_gss fix:
rpcsec_gss_exit_net has no chance to run when use-gss-proxy==1):
1. there is no chance to remove use-gss-proxy entry when use-gss-proxy does not write to 1.
2. netns evict function should be called earlier than exit function.

error log:
remove_proc_entry: removing non-empty directory 'net/rpc', leaking at least 'use-gss-proxy'
------------[ cut here ]------------
WARNING: CPU: 36 PID: 7509 at /data/rpmbuild/BUILD/kernel-4.14.105/kernel-4.14.105/fs/proc/generic.c:572 remove_proc_entry+0x1
Modules linked in: xt_nat ipt_REJECT nf_reject_ipv4 ip_set ip_vs_sh ip_vs_wrr ip_vs_rr ip_vs xt_comment xt_mark ipt_MASQUERADE
CPU: 36 PID: 7509 Comm: kworker/u128:2 Tainted: G        W       4.14.105-19-beta4 #1
Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.53 07/04/2018
Workqueue: netns cleanup_net
task: ffff808fd7cd7000 task.stack: ffff0000253f0000
PC is at remove_proc_entry+0x100/0x138
LR is at remove_proc_entry+0x100/0x138
pc : [<ffff00000830b500>] lr : [<ffff00000830b500>] pstate: 00000145
sp : ffff0000253f3c70
x29: ffff0000253f3c70 x28: 0000000000000000
x27: ffff808fcc4b5038 x26: dead000000000200
x25: ffff0000253f3da0 x24: ffff0000253f3db0
x23: ffff0000091dd280 x22: ffff801c2b94b000
x21: ffff000009303000 x20: ffff000000bba380
x19: ffff801cef676a00 x18: 000000000000002a
x17: 0000000000000030 x16: ffff000008156e30
x15: 0000000000000000 x14: 656c20746120676e
x13: 696b61656c202c27 x12: 6370722f74656e27
x11: 2079726f74636572 x10: 6964207974706d65
x9 : ffff0000081cc960 x8 : 0000000000000004
x7 : ffff000009242000 x6 : 0000000000007a06
x5 : 0000000000000000 x4 : 0000000000000000
x3 : 0000000000000000 x2 : ffff808ffbeee3c8
x1 : 0000808ff2e14000 x0 : 000000000000005b
Call trace:
Exception stack(0xffff0000253f3b30 to 0xffff0000253f3c70)
3b20:                                   000000000000005b 0000808ff2e14000
3b40: ffff808ffbeee3c8 0000000000000000 0000000000000000 0000000000000000
3b60: 0000000000007a06 ffff000009242000 0000000000000004 ffff0000081cc960
3b80: 6964207974706d65 2079726f74636572 6370722f74656e27 696b61656c202c27
3ba0: 656c20746120676e 0000000000000000 ffff000008156e30 0000000000000030
3bc0: 000000000000002a ffff801cef676a00 ffff000000bba380 ffff000009303000
3be0: ffff801c2b94b000 ffff0000091dd280 ffff0000253f3db0 ffff0000253f3da0
3c00: dead000000000200 ffff808fcc4b5038 0000000000000000 ffff0000253f3c70
3c20: ffff00000830b500 ffff0000253f3c70 ffff00000830b500 0000000000000145
3c40: ffff801c2b94b08d ffff801cef676a8d ffffffffffffffff 0000000000000000
3c60: ffff0000253f3c70 ffff00000830b500
[<ffff00000830b500>] remove_proc_entry+0x100/0x138
[<ffff000000badba0>] rpc_proc_exit+0x40/0x50 [sunrpc]
[<ffff000000ba3524>] sunrpc_exit_net+0x34/0x40 [sunrpc]
[<ffff000008a03784>] ops_exit_list.isra.3+0x4c/0x80
[<ffff000008a04170>] cleanup_net+0x1b0/0x2c0
[<ffff0000080e8558>] process_one_work+0x1f8/0x420
[<ffff0000080e87cc>] worker_thread+0x4c/0x470
[<ffff0000080eed7c>] kthread+0x134/0x138
[<ffff000008084f7c>] ret_from_fork+0x10/0x1c

Fixes: a0210fd669343660fc7481f2f422439dba19336c ("auth_gss fix: rpcsec_gss_exit_net has no chance to run when use-gss-proxy==1

Signed-off-by: Fuhai Wang <fuhaiwang@tencent.com>
2020-01-02 14:55:31 +08:00
..
auth_gss nsfs: fix netns proc warning 2020-01-02 14:55:31 +08:00
xprtrdma Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
Kconfig Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
Makefile Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
addr.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
auth.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
auth_generic.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
auth_null.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
auth_unix.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
backchannel_rqst.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
cache.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
clnt.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
debugfs.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
netns.h Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
rpc_pipe.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
rpcb_clnt.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
sched.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
socklib.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
stats.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
sunrpc.h Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
sunrpc_syms.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
svc.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
svc_xprt.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
svcauth.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
svcauth_unix.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
svcsock.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
sysctl.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
timer.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
xdr.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
xprt.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
xprtmultipath.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
xprtsock.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00