netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/4] net: fix possible race in skb_attempt_defer_free()
Date: Mon, 16 May 2022 11:54:54 -0700	[thread overview]
Message-ID: <20220516115454.18fbc4e1@kernel.org> (raw)
In-Reply-To: <CANn89iJnS5Yyofudjbr7ZO5okRF67w1FRebQ71h3Bg75CA_L+Q@mail.gmail.com>

On Mon, 16 May 2022 11:24:40 -0700 Eric Dumazet wrote:
> On Mon, May 16, 2022 at 11:16 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > If I'm reading this right this is useful for backports but in net-next
> > it really is a noop? The -EBUSY would be perfectly safe to ignore?
> > Just checking.  
> 
> Not sure I understand the question.
> 
> trigger_rx_softirq() and friends were only in net-next, so there is no
> backport needed.
> 
> Are you talking of calls from net_rps_send_ipi() ?
> These are fine, because we own an atomic bit (NAPI_STATE_SCHED).

Ah, I think I get it now. It was unclear what's the problem this patch
is solving this part of the commit message really is key:

> This is a common issue with smp_call_function_single_async().
> Callers must ensure correct synchronization and serialization.

smp_call_function_single_async() does not protect its own internal state
so we need to wrap it in our own locking (of some form thereof).

Sorry for the noise.

  reply	other threads:[~2022-05-16 18:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  4:24 [PATCH net-next 0/4] net: polish skb defer freeing Eric Dumazet
2022-05-16  4:24 ` [PATCH net-next 1/4] net: fix possible race in skb_attempt_defer_free() Eric Dumazet
2022-05-16 18:15   ` Jakub Kicinski
2022-05-16 18:24     ` Eric Dumazet
2022-05-16 18:54       ` Jakub Kicinski [this message]
2022-05-16  4:24 ` [PATCH net-next 2/4] net: use napi_consume_skb() in skb_defer_free_flush() Eric Dumazet
2022-05-16  4:24 ` [PATCH net-next 3/4] net: add skb_defer_max sysctl Eric Dumazet
2022-05-16 20:39   ` Jakub Kicinski
2022-05-16 20:43     ` Eric Dumazet
2022-05-16  4:24 ` [PATCH net-next 4/4] net: call skb_defer_free_flush() before each napi_poll() Eric Dumazet
2022-05-16 18:21   ` Jakub Kicinski
2022-05-16 18:26     ` Eric Dumazet
2022-05-16 18:56       ` Jakub Kicinski
2022-05-16 10:40 ` [PATCH net-next 0/4] net: polish skb defer freeing 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=20220516115454.18fbc4e1@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@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;
as well as URLs for NNTP newsgroup(s).