[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYRqOW_kWlfcEtWM@strlen.de>
Date: Thu, 5 Feb 2026 11:00:25 +0100
From: Florian Westphal <fw@...len.de>
To: Sun Jian <sun.jian.kdev@...il.com>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
netfilter-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/5] netfilter: ftp: annotate nf_nat_ftp_hook with
__rcu
Sun Jian <sun.jian.kdev@...il.com> wrote:
> diff --git a/include/linux/netfilter/nf_conntrack_ftp.h b/include/linux/netfilter/nf_conntrack_ftp.h
> index 0e38302820b9..f31292642035 100644
> --- a/include/linux/netfilter/nf_conntrack_ftp.h
> +++ b/include/linux/netfilter/nf_conntrack_ftp.h
> @@ -26,7 +26,7 @@ struct nf_ct_ftp_master {
>
> /* For NAT to hook in when we find a packet which describes what other
> * connection we should expect. */
> -extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
> +extern unsigned int (__rcu *nf_nat_ftp_hook)(struct sk_buff *skb,
> enum ip_conntrack_info ctinfo,
> enum nf_ct_ftp_type type,
> unsigned int protoff,
Patch 1 re-indents, the rest doesn't.
> diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
> index 617f744a2e3a..74811893dec4 100644
> --- a/net/netfilter/nf_conntrack_ftp.c
> +++ b/net/netfilter/nf_conntrack_ftp.c
> @@ -43,7 +43,7 @@ module_param_array(ports, ushort, &ports_c, 0400);
> static bool loose;
> module_param(loose, bool, 0600);
>
> -unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
> +unsigned int (__rcu *nf_nat_ftp_hook)(struct sk_buff *skb,
> enum ip_conntrack_info ctinfo,
> enum nf_ct_ftp_type type,
> unsigned int protoff,
CHECK: Alignment should match open parenthesis
#135: FILE: net/netfilter/nf_conntrack_ftp.c:47:
+unsigned int (__rcu *nf_nat_ftp_hook)(struct sk_buff *skb,
enum ip_conntrack_info ctinfo,
Please re-indent in .c and check that checkpatch.pl doesn't complain.
Also, no need to send this in multiple patches, its one logical
annotation change.
Powered by blists - more mailing lists