* [PATCH -next] netfilter: nftables: remove unnecessary spin_lock_init()
@ 2021-03-29 13:55 Yang Yingliang
2021-03-30 22:54 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-03-29 13:55 UTC (permalink / raw)
To: netdev, netfilter-devel; +Cc: pablo, kadlec
The spinlock nf_tables_destroy_list_lock is initialized statically.
It is unnecessary to initialize by spin_lock_init().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
net/netfilter/nf_tables_api.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index fc2526b8bd55..24eeb027a888 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -9193,7 +9193,6 @@ static int __init nf_tables_module_init(void)
{
int err;
- spin_lock_init(&nf_tables_destroy_list_lock);
err = register_pernet_subsys(&nf_tables_net_ops);
if (err < 0)
return err;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] netfilter: nftables: remove unnecessary spin_lock_init()
2021-03-29 13:55 [PATCH -next] netfilter: nftables: remove unnecessary spin_lock_init() Yang Yingliang
@ 2021-03-30 22:54 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2021-03-30 22:54 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, netfilter-devel, kadlec
On Mon, Mar 29, 2021 at 09:55:41PM +0800, Yang Yingliang wrote:
> The spinlock nf_tables_destroy_list_lock is initialized statically.
> It is unnecessary to initialize by spin_lock_init().
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-30 22:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 13:55 [PATCH -next] netfilter: nftables: remove unnecessary spin_lock_init() Yang Yingliang
2021-03-30 22:54 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).