Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751386AbdH1Vef (ORCPT ); Mon, 28 Aug 2017 17:34:35 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:37483 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdH1Ved (ORCPT ); Mon, 28 Aug 2017 17:34:33 -0400 MIME-Version: 1.0 X-Originating-IP: [108.49.102.27] In-Reply-To: <0cf3cc3fd48c3b0b9d1766c73ac4faea2a733bf3.1503744266.git.arvind.yadav.cs@gmail.com> References: <0cf3cc3fd48c3b0b9d1766c73ac4faea2a733bf3.1503744266.git.arvind.yadav.cs@gmail.com> From: Paul Moore Date: Mon, 28 Aug 2017 17:34:31 -0400 Message-ID: Subject: Re: [PATCH] selinux: constify nf_hook_ops To: Arvind Yadav Cc: selinux@tycho.nsa.gov, serge@hallyn.com, James Morris , Eric Paris , Stephen Smalley , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 975 Lines: 31 On Sat, Aug 26, 2017 at 6:47 AM, Arvind Yadav wrote: > 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 > --- > security/selinux/hooks.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Merged, thanks. > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c > index 33fd061..2f2e133 100644 > --- a/security/selinux/hooks.c > +++ b/security/selinux/hooks.c > @@ -6530,7 +6530,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, > -- > 2.7.4 -- paul moore www.paul-moore.com