[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241122134529.GB17061@breakpoint.cc>
Date: Fri, 22 Nov 2024 14:45:29 +0100
From: Florian Westphal <fw@...len.de>
To: Pei Xiao <xiaopei01@...inos.cn>
Cc: pablo@...filter.org, kadlec@...filter.org, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
syzbot+84d0441b9860f0d63285@...kaller.appspotmail.com,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] netfilter: nf_tables: Use get_cpu_ptr in nft_inner_eval
Pei Xiao <xiaopei01@...inos.cn> wrote:
> syzbot complain about using smp_processor_id in preemptible.
> use get_cpu_ptr to preempt_disable.
> Reported-by: syzbot+84d0441b9860f0d63285@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=84d0441b9860f0d63285
> Fixes: 0e795b37ba04 ("netfilter: nft_inner: add percpu inner context")
> Signed-off-by: Pei Xiao <xiaopei01@...inos.cn>
> ---
> net/netfilter/nft_inner.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/nft_inner.c b/net/netfilter/nft_inner.c
> index 928312d01eb1..ae85851bab77 100644
> --- a/net/netfilter/nft_inner.c
> +++ b/net/netfilter/nft_inner.c
> @@ -248,7 +248,7 @@ static bool nft_inner_parse_needed(const struct nft_inner *priv,
> static void nft_inner_eval(const struct nft_expr *expr, struct nft_regs *regs,
> const struct nft_pktinfo *pkt)
> {
> - struct nft_inner_tun_ctx *tun_ctx = this_cpu_ptr(&nft_pcpu_tun_ctx);
> + struct nft_inner_tun_ctx *tun_ctx = get_cpu_ptr(&nft_pcpu_tun_ctx);
> const struct nft_inner *priv = nft_expr_priv(expr);
This can't be right, where is it re-enabled?
Not related to your patch:
Why is this percpu? How is this softirq safe?
Powered by blists - more mailing lists