From: Frederic Weisbecker <frederic@kernel.org>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Hayes Wang <hayeswang@realtek.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
Paul Menzel <pmenzel@molgen.mpg.de>
Subject: Re: [PATCH 2/2] r8152: Call napi_schedule() from proper context
Date: Wed, 12 Feb 2025 21:58:08 +0100 [thread overview]
Message-ID: <Z60LYAml7kq_7XOb@pavilion.home> (raw)
In-Reply-To: <20250212204929.GA2685909@electric-eye.fr.zoreil.com>
Le Wed, Feb 12, 2025 at 09:49:29PM +0100, Francois Romieu a écrit :
> Frederic Weisbecker <frederic@kernel.org> :
> [...]
> > r8152 may call napi_schedule() on device resume time from a bare task
> > context without disabling softirqs as the following trace shows:
> [...]
> > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> > index 468c73974046..1325460ae457 100644
> > --- a/drivers/net/usb/r8152.c
> > +++ b/drivers/net/usb/r8152.c
> > @@ -8537,8 +8537,11 @@ static int rtl8152_runtime_resume(struct r8152 *tp)
> > clear_bit(SELECTIVE_SUSPEND, &tp->flags);
> > smp_mb__after_atomic();
> >
> > - if (!list_empty(&tp->rx_done))
> > + if (!list_empty(&tp->rx_done)) {
> > + local_bh_disable();
> > napi_schedule(&tp->napi);
> > + local_bh_enable();
> > + }
>
> AFAIU drivers/net/usb/r8152.c::rtl_work_func_t exhibits the same
> problem.
It's a workqueue function and softirqs don't seem to be disabled.
Looks like a goot catch!
Thanks.
>
> --
> Ueimor
next prev parent reply other threads:[~2025-02-12 20:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 17:43 [PATCH 0/2] net: Fix/prevent napi_schedule() call from bare task context Frederic Weisbecker
2025-02-12 17:43 ` [PATCH 1/2] net: Assert proper context while calling napi_schedule() Frederic Weisbecker
2025-02-13 3:48 ` Jakub Kicinski
2025-02-13 9:58 ` Breno Leitao
2025-02-13 15:14 ` Jakub Kicinski
2025-02-13 18:14 ` Breno Leitao
2025-02-13 19:04 ` Jakub Kicinski
2025-02-13 20:38 ` Frederic Weisbecker
2025-02-14 22:00 ` Jakub Kicinski
2025-02-15 21:16 ` Frederic Weisbecker
2025-02-14 13:05 ` Breno Leitao
2025-02-14 16:43 ` Breno Leitao
2025-02-14 22:10 ` Jakub Kicinski
2025-02-17 16:46 ` Breno Leitao
2025-02-17 17:37 ` Jakub Kicinski
2025-02-13 20:39 ` Frederic Weisbecker
2025-02-14 22:03 ` Jakub Kicinski
2025-02-12 17:43 ` [PATCH 2/2] r8152: Call napi_schedule() from proper context Frederic Weisbecker
2025-02-12 20:49 ` Francois Romieu
2025-02-12 20:58 ` Frederic Weisbecker [this message]
2025-02-18 20:12 ` Paul Menzel
2025-04-27 20:50 ` Tobias Jakobi
2025-04-28 17:49 ` Jakub Kicinski
2025-04-28 20:26 ` Tobias Jakobi
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=Z60LYAml7kq_7XOb@pavilion.home \
--to=frederic@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hayeswang@realtek.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pmenzel@molgen.mpg.de \
--cc=romieu@fr.zoreil.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