[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ8uoz0NRRoviHd4tthsyMyAqw2FRUeWn17VP4k-7=9uJ3Kitw@mail.gmail.com>
Date: Mon, 28 Feb 2022 14:27:49 +0100
From: Magnus Karlsson <magnus.karlsson@...il.com>
To: Björn Töpel <bjorn.topel@...il.com>
Cc: "Karlsson, Magnus" <magnus.karlsson@...el.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Netdev <netdev@...r.kernel.org>,
"Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
bpf <bpf@...r.kernel.org>, Elza Mathew <elza.mathew@...el.com>
Subject: Re: [PATCH bpf v2] xsk: fix race at socket teardown
On Mon, Feb 28, 2022 at 2:21 PM Björn Töpel <bjorn.topel@...il.com> wrote:
>
> On Mon, 28 Feb 2022 at 10:46, Magnus Karlsson <magnus.karlsson@...il.com> wrote:
> >
> > From: Magnus Karlsson <magnus.karlsson@...el.com>
> >
> > Fix a race in the xsk socket teardown code that can lead to a null
> > pointer dereference splat. The current xsk unbind code in
> > xsk_unbind_dev() starts by setting xs->state to XSK_UNBOUND, sets
> > xs->dev to NULL and then waits for any NAPI processing to terminate
> > using synchronize_net(). After that, the release code starts to tear
> > down the socket state and free allocated memory.
> >
> [...]
> >
> > v1 -> v2:
> > * Naming xsk_zc_xmit() -> xsk_wakeup() [Maciej]
> >
>
> Magnus,
>
> You forgot to include my ACK! So, again:
>
> Acked-by: Björn Töpel <bjorn@...nel.org>
Sorry for that Björn.
/Magnus
>
> Cheers,
> Björn
Powered by blists - more mailing lists