Re: [EXTERNAL] Re: [PATCH net v2 1/4] octeon_ep: fix race conditions in ndo_get_stats64

From: Eric Dumazet
Date: Wed Dec 18 2024 - 10:40:26 EST


On Wed, Dec 18, 2024 at 4:25 PM Shinas Rasheed <srasheed@xxxxxxxxxxx> wrote:

> Hi Eric,
>
> This patch is not a workaround. In some setups, we were seeing races with regards
> to resource freeing between ndo_stop() and ndo_get_stats(). Hence to sync with the view of
> resources, a synchronize_net() is called in ndo_stop(). Please let me know if you see anything wrong here.

We do not add a synchronize_net() without a very strong explanation
(details, not a weak sentence in the changelog).

Where is the opposite barrier in your patch ?

I am saying you do not need this, unless you can show evidence.

If your ndo_get_stats() needs to call netif_running(), this would be
the fix IMO.