]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 16:57:51 +0000 (17:57 +0100)
commit01af79d6affaa893ddb0295cf9ffe6cba2f69a45
treebd3d66f726fe80e0075be8863fadbd5e4ef75a11
parent93d486116d1b0e9cdebd29ac8a2f3efe80459223
ipvs: fix WARNING in ip_vs_app_net_cleanup()

[ Upstream commit 695e95e71a4400c70edc18b7d65afeb5b858d5b8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/ipvs/ip_vs_app.c