Patch "eth: sungem: remove .ndo_poll_controller to avoid deadlocks" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    eth: sungem: remove .ndo_poll_controller to avoid deadlocks

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     eth-sungem-remove-.ndo_poll_controller-to-avoid-dead.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f5ef8a688d5125f0b769848709f5d3d9a6a1a56d
Author: Jakub Kicinski <kuba@xxxxxxxxxx>
Date:   Wed May 8 06:45:04 2024 -0700

    eth: sungem: remove .ndo_poll_controller to avoid deadlocks
    
    [ Upstream commit ac0a230f719b02432d8c7eba7615ebd691da86f4 ]
    
    Erhard reports netpoll warnings from sungem:
    
      netpoll_send_skb_on_dev(): eth0 enabled interrupts in poll (gem_start_xmit+0x0/0x398)
      WARNING: CPU: 1 PID: 1 at net/core/netpoll.c:370 netpoll_send_skb+0x1fc/0x20c
    
    gem_poll_controller() disables interrupts, which may sleep.
    We can't sleep in netpoll, it has interrupts disabled completely.
    Strangely, gem_poll_controller() doesn't even poll the completions,
    and instead acts as if an interrupt has fired so it just schedules
    NAPI and exits. None of this has been necessary for years, since
    netpoll invokes NAPI directly.
    
    Fixes: fe09bb619096 ("sungem: Spring cleaning and GRO support")
    Reported-and-tested-by: Erhard Furtner <erhard_f@xxxxxxxxxxx>
    Link: https://lore.kernel.org/all/20240428125306.2c3080ef@legion
    Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240508134504.3560956-1-kuba@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
index d72018a60c0f7..e14c1ac767baa 100644
--- a/drivers/net/ethernet/sun/sungem.c
+++ b/drivers/net/ethernet/sun/sungem.c
@@ -949,17 +949,6 @@ static irqreturn_t gem_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_NET_POLL_CONTROLLER
-static void gem_poll_controller(struct net_device *dev)
-{
-	struct gem *gp = netdev_priv(dev);
-
-	disable_irq(gp->pdev->irq);
-	gem_interrupt(gp->pdev->irq, dev);
-	enable_irq(gp->pdev->irq);
-}
-#endif
-
 static void gem_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
 	struct gem *gp = netdev_priv(dev);
@@ -2836,9 +2825,6 @@ static const struct net_device_ops gem_netdev_ops = {
 	.ndo_change_mtu		= gem_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_set_mac_address    = gem_set_mac_address,
-#ifdef CONFIG_NET_POLL_CONTROLLER
-	.ndo_poll_controller    = gem_poll_controller,
-#endif
 };
 
 static int gem_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux