[Devel] [PATCH RH9 1/2] ve: fix compilation warning in nf_log_allowed_ve
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Fri Jan 6 15:02:10 MSK 2023
net/netfilter/nf_log_syslog.c: In function 'nf_log_allowed_ve':
net/netfilter/nf_log_syslog.c:52:31: warning: passing argument 1 of 'is_ve_init_net' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
52 | return is_ve_init_net(net) || sysctl_nf_log_all_netns;
| ^~~
In file included from net/netfilter/nf_log_syslog.c:19:
./include/linux/ve.h:222:40: note: expected 'struct net *' but argument is of type 'const struct net *'
222 | extern bool is_ve_init_net(struct net *net);
| ~~~~~~~~~~~~^~~
Fixes: e817f12be9be ("ve/nf_log_syslog: allow packet logging in ve init netns")
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
kernel/ve/ve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 8f15aefcd6d0..e6b76e9b6175 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -297,7 +297,7 @@ struct net *ve_get_net_ns(struct ve_struct* ve)
}
EXPORT_SYMBOL(ve_get_net_ns);
-bool is_ve_init_net(struct net *net)
+bool is_ve_init_net(const struct net *net)
{
struct ve_struct *ve = net->owner_ve;
struct nsproxy *ve_ns;
--
2.39.0
More information about the Devel
mailing list