Linux CAN drivers development
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	mkl@pengutronix.de, mailhol.vincent@wanadoo.fr,
	linux-can@vger.kernel.org
Subject: Re: [PATCH net-next] can: grcan: move napi_enable() from under spin lock
Date: Sat, 11 Jan 2025 19:03:37 +0100	[thread overview]
Message-ID: <20250111180337.GA1661553@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20250111024742.3680902-1-kuba@kernel.org>

Jakub Kicinski <kuba@kernel.org> :
> I don't see any reason why napi_enable() needs to be under the lock,
> only reason I could think of is if the IRQ also took this lock
> but it doesn't. napi_enable() will soon need to sleep.

Anything that depends on the napi handler being run may also behave
differently because of 'priv->resetting = false;' and
'priv->closing = false;' also done under the lock after napi_enable in
the original version.

Both priv->closing and priv->resetting are always accessed with lock
held so it's fine.

(nothing to chew in grcan_start either)

Reviewed-by: Francois Romieu <romieu@fr.zoreil.com>

-- 
Ueimor

  parent reply	other threads:[~2025-01-11 18:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-11  2:47 [PATCH net-next] can: grcan: move napi_enable() from under spin lock Jakub Kicinski
2025-01-11 14:20 ` Vincent Mailhol
2025-01-11 18:03 ` Francois Romieu [this message]
2025-01-13  9:52 ` Marc Kleine-Budde
2025-01-14  3:30 ` 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=20250111180337.GA1661553@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=mkl@pengutronix.de \
    --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