]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
netfilter: conntrack: mark extension structs as const
authorFlorian Westphal <fw@strlen.de>
Thu, 20 Apr 2017 07:54:23 +0000 (09:54 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Apr 2017 07:30:22 +0000 (09:30 +0200)
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_extend.h
net/netfilter/nf_conntrack_acct.c
net/netfilter/nf_conntrack_ecache.c
net/netfilter/nf_conntrack_extend.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_labels.c
net/netfilter/nf_conntrack_seqadj.c
net/netfilter/nf_conntrack_timeout.c
net/netfilter/nf_conntrack_timestamp.c

index dd776bf9e2fa06a0ab0e87598cb2b610a58e0253..b01f73fb4dcbd1e82f91136e30fc2d2a71f0ab81 100644 (file)
@@ -99,6 +99,6 @@ struct nf_ct_ext_type {
        u8 align;
 };
 
-int nf_ct_extend_register(struct nf_ct_ext_type *type);
-void nf_ct_extend_unregister(struct nf_ct_ext_type *type);
+int nf_ct_extend_register(const struct nf_ct_ext_type *type);
+void nf_ct_extend_unregister(const struct nf_ct_ext_type *type);
 #endif /* _NF_CONNTRACK_EXTEND_H */
index 45da11afa785b2779857b3786881158c821263b3..86691671290519809bf8b39b150c7b040a3c0fe1 100644 (file)
@@ -55,7 +55,7 @@ seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir)
 };
 EXPORT_SYMBOL_GPL(seq_print_acct);
 
-static struct nf_ct_ext_type acct_extend __read_mostly = {
+static const struct nf_ct_ext_type acct_extend = {
        .len    = sizeof(struct nf_conn_acct),
        .align  = __alignof__(struct nf_conn_acct),
        .id     = NF_CT_EXT_ACCT,
index 5152129481258395d69b1315d052074aadd598d1..caac41ad9483ed36333884f8e584521778e76937 100644 (file)
@@ -347,7 +347,7 @@ static struct ctl_table event_sysctl_table[] = {
 };
 #endif /* CONFIG_SYSCTL */
 
-static struct nf_ct_ext_type event_extend __read_mostly = {
+static const struct nf_ct_ext_type event_extend = {
        .len    = sizeof(struct nf_conntrack_ecache),
        .align  = __alignof__(struct nf_conntrack_ecache),
        .id     = NF_CT_EXT_ECACHE,
index 2e4b41bc67a0fb2d1fa79c7d0a3dc90ef384011f..5c66816eb965129cc0bc8dcfe76d5fbc9351142e 100644 (file)
@@ -116,7 +116,7 @@ void *nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
 EXPORT_SYMBOL(nf_ct_ext_add);
 
 /* This MUST be called in process context. */
-int nf_ct_extend_register(struct nf_ct_ext_type *type)
+int nf_ct_extend_register(const struct nf_ct_ext_type *type)
 {
        int ret = 0;
 
@@ -134,7 +134,7 @@ out:
 EXPORT_SYMBOL_GPL(nf_ct_extend_register);
 
 /* This MUST be called in process context. */
-void nf_ct_extend_unregister(struct nf_ct_ext_type *type)
+void nf_ct_extend_unregister(const struct nf_ct_ext_type *type)
 {
        mutex_lock(&nf_ct_ext_type_mutex);
        RCU_INIT_POINTER(nf_ct_ext_types[type->id], NULL);
index 8239b4406f56f031fa29b3c07f8030f44cf3df41..a57a52f173f7023b2df4301ac92d33bdce448e13 100644 (file)
@@ -535,7 +535,7 @@ void nf_conntrack_helpers_unregister(struct nf_conntrack_helper *helper,
 }
 EXPORT_SYMBOL_GPL(nf_conntrack_helpers_unregister);
 
-static struct nf_ct_ext_type helper_extend __read_mostly = {
+static const struct nf_ct_ext_type helper_extend = {
        .len    = sizeof(struct nf_conn_help),
        .align  = __alignof__(struct nf_conn_help),
        .id     = NF_CT_EXT_HELPER,
index bcab8bde73128f9f9f8b4dba31a1c283b07f8eb1..adf2198599018ca6ec4377ffa4b92bb0a2dcd169 100644 (file)
@@ -82,7 +82,7 @@ void nf_connlabels_put(struct net *net)
 }
 EXPORT_SYMBOL_GPL(nf_connlabels_put);
 
-static struct nf_ct_ext_type labels_extend __read_mostly = {
+static const struct nf_ct_ext_type labels_extend = {
        .len    = sizeof(struct nf_conn_labels),
        .align  = __alignof__(struct nf_conn_labels),
        .id     = NF_CT_EXT_LABELS,
index ef7063eced7c490dd6813d3e54ee72fdad9a8565..a975efd6b8c3e3baac2a80334237be9201ace130 100644 (file)
@@ -231,7 +231,7 @@ s32 nf_ct_seq_offset(const struct nf_conn *ct,
 }
 EXPORT_SYMBOL_GPL(nf_ct_seq_offset);
 
-static struct nf_ct_ext_type nf_ct_seqadj_extend __read_mostly = {
+static const struct nf_ct_ext_type nf_ct_seqadj_extend = {
        .len    = sizeof(struct nf_conn_seqadj),
        .align  = __alignof__(struct nf_conn_seqadj),
        .id     = NF_CT_EXT_SEQADJ,
index 26e742006c48c944ba16aea8d8a2ed541ad06ca1..46aee65f339bea3e39e6fcdd94d82d4646b991b4 100644 (file)
@@ -31,7 +31,7 @@ EXPORT_SYMBOL_GPL(nf_ct_timeout_find_get_hook);
 void (*nf_ct_timeout_put_hook)(struct ctnl_timeout *timeout) __read_mostly;
 EXPORT_SYMBOL_GPL(nf_ct_timeout_put_hook);
 
-static struct nf_ct_ext_type timeout_extend __read_mostly = {
+static const struct nf_ct_ext_type timeout_extend = {
        .len    = sizeof(struct nf_conn_timeout),
        .align  = __alignof__(struct nf_conn_timeout),
        .id     = NF_CT_EXT_TIMEOUT,
index 7a394df0deb7686fa7fe4da162ff77d3c03435c5..4c4734b78318962360bd07265dc8179f95fc5135 100644 (file)
@@ -33,7 +33,7 @@ static struct ctl_table tstamp_sysctl_table[] = {
 };
 #endif /* CONFIG_SYSCTL */
 
-static struct nf_ct_ext_type tstamp_extend __read_mostly = {
+static const struct nf_ct_ext_type tstamp_extend = {
        .len    = sizeof(struct nf_conn_tstamp),
        .align  = __alignof__(struct nf_conn_tstamp),
        .id     = NF_CT_EXT_TSTAMP,