Skip to content

Commit 0c3014f

Browse files
ArvindYadavCspcmoore
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent 901ef84 commit 0c3014f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/selinux/hooks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6550,7 +6550,7 @@ security_initcall(selinux_init);
65506550

65516551
#if defined(CONFIG_NETFILTER)
65526552

6553-
static struct nf_hook_ops selinux_nf_ops[] = {
6553+
static const struct nf_hook_ops selinux_nf_ops[] = {
65546554
{
65556555
.hook = selinux_ipv4_postroute,
65566556
.pf = NFPROTO_IPV4,

0 commit comments

Comments
 (0)