Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754533AbdHZKtY (ORCPT ); Sat, 26 Aug 2017 06:49:24 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35734 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbdHZKtU (ORCPT ); Sat, 26 Aug 2017 06:49:20 -0400 From: Arvind Yadav To: serge@hallyn.com, james.l.morris@oracle.com, casey@schaufler-ca.com Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [PATCH] smack: constify nf_hook_ops Date: Sat, 26 Aug 2017 16:18:46 +0530 Message-Id: <34731ab554f22661849c01f4e6a675798e834245.1503744327.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 788 Lines: 24 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/smack/smack_netfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/smack/smack_netfilter.c b/security/smack/smack_netfilter.c index cdeb0f3..e36d178 100644 --- a/security/smack/smack_netfilter.c +++ b/security/smack/smack_netfilter.c @@ -58,7 +58,7 @@ static unsigned int smack_ipv4_output(void *priv, return NF_ACCEPT; } -static struct nf_hook_ops smack_nf_ops[] = { +static const struct nf_hook_ops smack_nf_ops[] = { { .hook = smack_ipv4_output, .pf = NFPROTO_IPV4, -- 2.7.4