BPF List
 help / color / mirror / Atom feed
From: Edward Cree <ecree.xilinx@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	netdev@vger.kernel.org, linux-net-drivers@amd.com,
	bpf@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Jesper Dangaard Brouer" <hawk@kernel.org>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Martin Habets" <habetsm.xilinx@gmail.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Yury Vostrikov" <mon@unformed.ru>
Subject: Re: [PATCH net] sfc: Don't invoke xdp_do_flush() from netpoll.
Date: Wed, 2 Oct 2024 14:36:36 +0100	[thread overview]
Message-ID: <48bb0155-cc1a-b72c-2d04-98d28adb467b@gmail.com> (raw)
In-Reply-To: <20241002125837.utOcRo6Y@linutronix.de>

On 02/10/2024 13:58, Sebastian Andrzej Siewior wrote:
> Yury reported a crash in the sfc driver originated from
> netpoll_send_udp(). The netconsole sends a message and then netpoll
> invokes the driver's NAPI function with a budget of zero. It is
> dedicated to allow driver to free TX resources, that it may have used
> while sending the packet.
> 
> In the netpoll case the driver invokes xdp_do_flush() unconditionally,
> leading to crash because bpf_net_context was never assigned.
> 
> Invoke xdp_do_flush() only if budget is not zero.
> 
> Fixes: 401cb7dae8130 ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.")
> Reported-by: Yury Vostrikov <mon@unformed.ru>
> Closes: https://lore.kernel.org/5627f6d1-5491-4462-9d75-bc0612c26a22@app.fastmail.com
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>

  reply	other threads:[~2024-10-02 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 12:58 [PATCH net] sfc: Don't invoke xdp_do_flush() from netpoll Sebastian Andrzej Siewior
2024-10-02 13:36 ` Edward Cree [this message]
2024-10-03 22:44 ` Jakub Kicinski
2024-10-03 22:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48bb0155-cc1a-b72c-2d04-98d28adb467b@gmail.com \
    --to=ecree.xilinx@gmail.com \
    --cc=ast@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=mon@unformed.ru \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=toke@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox