From: Jakub Kicinski <kuba@kernel.org>
To: Moon Yeounsu <yyyynoom@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: dlink: add synchronization for stats update
Date: Tue, 29 Apr 2025 14:35:03 -0700 [thread overview]
Message-ID: <20250429143503.5a44a94f@kernel.org> (raw)
In-Reply-To: <20250425231352.102535-2-yyyynoom@gmail.com>
On Sat, 26 Apr 2025 08:13:52 +0900 Moon Yeounsu wrote:
> + spin_lock_irq(&np->stats_lock);
> /* Maximum Collisions */
> if (tx_status & 0x08)
> dev->stats.collisions++;
> +
> + dev->stats.tx_errors++;
> + spin_unlock_irq(&np->stats_lock);
I could be wrong but since this code runs in IRQ context I believe
you need to use spin_lock_irqsave() here. Or just spin_lock() but
not sure, and spin_lock_irqsave() always works..
--
pw-bot: cr
next prev parent reply other threads:[~2025-04-29 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 23:13 [PATCH net-next v2] net: dlink: add synchronization for stats update Moon Yeounsu
2025-04-29 21:35 ` Jakub Kicinski [this message]
2025-05-02 23:50 ` Moon Yeounsu
2025-05-06 1:49 ` Jakub Kicinski
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=20250429143503.5a44a94f@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yyyynoom@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.