Re: [net-next PATCH v13 2/9] net: dsa: realtek: rtl8365mb: reject unsupported topologies

From: Luiz Angelo Daros de Luca

Date: Sun Jun 07 2026 - 22:41:58 EST


> Sashiko reports a potential deadlock around stats_lock, however I couldn't find a call chain reaching rtl8365mb_get_stats64() from softirq context. Can anyone point to such a path?

Hi,

This patch series does not modify the stats collection logic itself.
The analyzer likely flagged this because the series touches the loop
that initializes the stats_locks, drawing attention to the locking
structure. If this deadlock path is valid, it is a pre-existing bug.

Regarding the softirq context, my bet is that this path might be
triggered by bonding or TC. Both can invoke dev_get_stats(), which
eventually calls rtl8365mb_get_stats64(). During tests, you could
inject a larger lock window (using mdelay()) to increase the chance of
a softirq hitting while the lock is held.

If that is indeed the case, we should replace spin_lock() with
spin_lock_bh() in a separate fix targeted at the net tree (not
net-next).

Regards,

Luiz