From: sashiko-bot@kernel.org
To: "Lorenzo Bianconi" <lorenzo@kernel.org>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v9 2/6] net: airoha: Remove private net_device pointer in airoha_gdm_dev struct
Date: Thu, 04 Jun 2026 06:01:24 +0000 [thread overview]
Message-ID: <20260604060124.ACAD11F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260603-airoha-eth-multi-serdes-v9-2-5d476bc2f426@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Potential deadlock in airoha_update_hw_stats() due to use of spin_lock() instead of spin_lock_bh().
--
commit d33fdec52e6f77bf6de4ab248729e1a868e78dc6
Author: Lorenzo Bianconi <lorenzo@kernel.org>
net: airoha: Remove private net_device pointer in airoha_gdm_dev struct
This commit removes the redundant net_device pointer from the
airoha_gdm_dev struct. The code now relies on the netdev_from_priv()
routine to retrieve the net_device pointer. This is a refactoring change
with no logical modifications.
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
> index 6574901ebd19b..57a16de0a2ec7 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.c
> +++ b/drivers/net/ethernet/airoha/airoha_eth.c
[ ... ]
[Severity: High]
This isn't a bug introduced by this patch, but I noticed a potential
deadlock in airoha_update_hw_stats():
drivers/net/ethernet/airoha/airoha_eth.c:airoha_update_hw_stats() {
...
spin_lock(&port->stats.lock);
...
}
Does this code risk a deadlock? The ndo_get_stats64 callback
(airoha_dev_get_stats64) can be executed in softirq context, while this
lock is also acquired from process context (e.g., via ethtool) without
disabling softirqs.
If a softirq interrupts the process context reader holding the lock on the
same CPU, wouldn't it spin forever trying to acquire the same lock? Should
spin_lock_bh() be used here instead to prevent this?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260603-airoha-eth-multi-serdes-v9-0-5d476bc2f426@kernel.org?part=2
next prev parent reply other threads:[~2026-06-04 6:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 6:00 [PATCH net-next v9 0/6] net: airoha: Support multiple net_devices connected to the same GDM port Lorenzo Bianconi
2026-06-03 6:00 ` [PATCH net-next v9 1/6] dt-bindings: net: airoha: Add GDM port ethernet child node Lorenzo Bianconi
2026-06-03 6:00 ` [PATCH net-next v9 2/6] net: airoha: Remove private net_device pointer in airoha_gdm_dev struct Lorenzo Bianconi
2026-06-04 6:01 ` sashiko-bot [this message]
2026-06-04 7:50 ` Lorenzo Bianconi
2026-06-03 6:00 ` [PATCH net-next v9 3/6] net: airoha: Support multiple net_devices for a single FE GDM port Lorenzo Bianconi
2026-06-04 6:01 ` sashiko-bot
2026-06-04 8:33 ` Lorenzo Bianconi
2026-06-04 8:41 ` Lorenzo Bianconi
2026-06-03 6:00 ` [PATCH net-next v9 4/6] net: airoha: Do not stop GDM port if it is shared Lorenzo Bianconi
2026-06-03 6:00 ` [PATCH net-next v9 5/6] net: airoha: Introduce WAN device flag Lorenzo Bianconi
2026-06-03 6:00 ` [PATCH net-next v9 6/6] net: airoha: Support multiple LAN/WAN interfaces for hw MAC address configuration Lorenzo Bianconi
2026-06-04 6:01 ` sashiko-bot
2026-06-04 9:03 ` Lorenzo Bianconi
2026-06-04 9:20 ` Lorenzo Bianconi
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=20260604060124.ACAD11F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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