]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: fix WARNING in ip_vs_app_net_cleanup()
authorZhengchao Shao <shaozhengchao@huawei.com>
Mon, 31 Oct 2022 12:07:05 +0000 (20:07 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 2 Nov 2022 08:39:14 +0000 (09:39 +0100)
commit6b84d22000b540088d6b736bc189d2b8e3e36a23
tree9602957358e47302b244fa11deeed3843962025d
parent46df371e8d079199a58329e11045c69e99f8ec48
ipvs: fix WARNING in ip_vs_app_net_cleanup()

During the initialization of ip_vs_app_net_init(), if file ip_vs_app
fails to be created, the initialization is successful by default.
Therefore, the ip_vs_app file doesn't be found during the remove in
ip_vs_app_net_cleanup(). It will cause WRNING.

The following is the stack information:
name 'ip_vs_app'
WARNING: CPU: 1 PID: 9 at fs/proc/generic.c:712 remove_proc_entry+0x389/0x460
Modules linked in:
Workqueue: netns cleanup_net
RIP: 0010:remove_proc_entry+0x389/0x460
Call Trace:
<TASK>
ops_exit_list+0x125/0x170
cleanup_net+0x4ea/0xb00
process_one_work+0x9bf/0x1710
worker_thread+0x665/0x1080
kthread+0x2e4/0x3a0
ret_from_fork+0x1f/0x30
</TASK>

Fixes: 25bceb823b6e ("[NET]: Make /proc/net per network namespace")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/ip_vs_app.c