Patch "net: amd: Fix link leak when verifying config failed" has been added to the 6.3-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: amd: Fix link leak when verifying config failed

to the 6.3-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-amd-fix-link-leak-when-verifying-config-failed.patch
and it can be found in the queue-6.3 subdirectory.

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



commit f76360d38bcb080f211be5a0f65277cd27e26588
Author: Gencen Gan <gangecen@xxxxxxxxxxx>
Date:   Mon Apr 24 23:28:01 2023 +0800

    net: amd: Fix link leak when verifying config failed
    
    [ Upstream commit d325c34d9e7e38d371c0a299d415e9b07f66a1fb ]
    
    After failing to verify configuration, it returns directly without
    releasing link, which may cause memory leak.
    
    Paolo Abeni thinks that the whole code of this driver is quite
    "suboptimal" and looks unmainatained since at least ~15y, so he
    suggests that we could simply remove the whole driver, please
    take it into consideration.
    
    Simon Horman suggests that the fix label should be set to
    "Linux-2.6.12-rc2" considering that the problem has existed
    since the driver was introduced and the commit above doesn't
    seem to exist in net/net-next.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Gan Gecen <gangecen@xxxxxxxxxxx>
    Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c
index 823a329a921f4..0dd391c84c138 100644
--- a/drivers/net/ethernet/amd/nmclan_cs.c
+++ b/drivers/net/ethernet/amd/nmclan_cs.c
@@ -651,7 +651,7 @@ static int nmclan_config(struct pcmcia_device *link)
     } else {
       pr_notice("mace id not found: %x %x should be 0x40 0x?9\n",
 		sig[0], sig[1]);
-      return -ENODEV;
+      goto failed;
     }
   }
 



[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