Patch "net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue" 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

    net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue

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:
     net-microchip-sparx5-fix-missing-destroy_workqueue-o.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 b396dcd62cf502edac5ae55dae30cb9af33d6f1e
Author: Qiheng Lin <linqiheng@xxxxxxxxxx>
Date:   Sat Dec 3 15:02:59 2022 +0800

    net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue
    
    [ Upstream commit 7b8232bdb1789a257de3129a9bb08c69b93a17db ]
    
    The mchp_sparx5_probe() won't destroy workqueue created by
    create_singlethread_workqueue() in sparx5_start() when later
    inits failed. Add destroy_workqueue in the cleanup_ports case,
    also add it in mchp_sparx5_remove()
    
    Fixes: b37a1bae742f ("net: sparx5: add mactable support")
    Signed-off-by: Qiheng Lin <linqiheng@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221203070259.19560-1-linqiheng@xxxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
index 435ac224e38e..0463f20da17b 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
@@ -829,6 +829,8 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
 
 cleanup_ports:
 	sparx5_cleanup_ports(sparx5);
+	if (sparx5->mact_queue)
+		destroy_workqueue(sparx5->mact_queue);
 cleanup_config:
 	kfree(configs);
 cleanup_pnode:
@@ -852,6 +854,7 @@ static int mchp_sparx5_remove(struct platform_device *pdev)
 	sparx5_cleanup_ports(sparx5);
 	/* Unregister netdevs */
 	sparx5_unregister_notifier_blocks(sparx5);
+	destroy_workqueue(sparx5->mact_queue);
 
 	return 0;
 }



[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