lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 6 Mar 2022 22:57:53 +0100 From: Sebastian Andrzej Siewior <bigeasy@...utronix.de> To: netdev@...r.kernel.org Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, Divya Koppera <Divya.Koppera@...rochip.com> Subject: [PATCH net-next 10/10] net: phy: micrel: Move netif_rx() outside of IRQ-off section. lan8814_match_rx_ts() invokes netif_rx() with disables interrupts outside which will create a warning. Invoking netif_rx_ni() with disabled interrupts is wrong even without the recent rework because netif_rx_ni() would enable interrupts while processing the softirq. This in turn can lead to dead lock if an interrupts triggers and attempts to acquire kszphy_ptp_priv::rx_ts_lock. Move netif_rx() outside the IRQ-off section. Cc: Andrew Lunn <andrew@...n.ch> Cc: Heiner Kallweit <hkallweit1@...il.com> Cc: Russell King <linux@...linux.org.uk> Cc: Divya Koppera <Divya.Koppera@...rochip.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de> --- drivers/net/phy/micrel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index cbae1524a420f..ce3992383766d 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -2045,8 +2045,6 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv, memset(shhwtstamps, 0, sizeof(*shhwtstamps)); shhwtstamps->hwtstamp = ktime_set(rx_ts->seconds, rx_ts->nsec); - netif_rx(skb); - list_del(&rx_ts->list); kfree(rx_ts); @@ -2055,6 +2053,8 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv, } spin_unlock_irqrestore(&ptp_priv->rx_ts_lock, flags); + if (ret) + netif_rx(skb); return ret; } -- 2.35.1
Powered by blists - more mailing lists