Patch "ionic: Fix netdev notifier unregister on failure" 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

    ionic: Fix netdev notifier unregister on failure

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:
     ionic-fix-netdev-notifier-unregister-on-failure.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 bfde39e7d0b2636130b23e9a6a3d69b94dbc70d4
Author: Brett Creeley <brett.creeley@xxxxxxx>
Date:   Thu Dec 12 13:31:55 2024 -0800

    ionic: Fix netdev notifier unregister on failure
    
    [ Upstream commit 9590d32e090ea2751e131ae5273859ca22f5ac14 ]
    
    If register_netdev() fails, then the driver leaks the netdev notifier.
    Fix this by calling ionic_lif_unregister() on register_netdev()
    failure. This will also call ionic_lif_unregister_phc() if it has
    already been registered.
    
    Fixes: 30b87ab4c0b3 ("ionic: remove lif list concept")
    Signed-off-by: Brett Creeley <brett.creeley@xxxxxxx>
    Signed-off-by: Shannon Nelson <shannon.nelson@xxxxxxx>
    Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
    Link: https://patch.msgid.link/20241212213157.12212-2-shannon.nelson@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 910d8973a4b0..cdc3c55fab6a 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -3514,8 +3514,8 @@ int ionic_lif_register(struct ionic_lif *lif)
 	/* only register LIF0 for now */
 	err = register_netdev(lif->netdev);
 	if (err) {
-		dev_err(lif->ionic->dev, "Cannot register net device, aborting\n");
-		ionic_lif_unregister_phc(lif);
+		dev_err(lif->ionic->dev, "Cannot register net device: %d, aborting\n", err);
+		ionic_lif_unregister(lif);
 		return err;
 	}
 




[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