From: Arvind Yadav Date: Sat, 26 Aug 2017 10:47:35 +0000 (+0530) Subject: selinux: constify nf_hook_ops X-Git-Tag: v4.14~350^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=0c3014f22dec0e1d14c8298551bfb6434638bdd9;p=mirror_ubuntu-bionic-kernel.git selinux: constify nf_hook_ops nf_hook_ops are not supposed to change at runtime. nf_register_net_hooks and nf_unregister_net_hooks are working with const nf_hook_ops. So mark the non-const nf_hook_ops structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Paul Moore --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index f803fdcde9cf..45943e18da8b 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -6550,7 +6550,7 @@ security_initcall(selinux_init); #if defined(CONFIG_NETFILTER) -static struct nf_hook_ops selinux_nf_ops[] = { +static const struct nf_hook_ops selinux_nf_ops[] = { { .hook = selinux_ipv4_postroute, .pf = NFPROTO_IPV4,