- drivers-ata-correct-a-wrong-free-function-for-sata_nv-driver.patch removed from -mm tree

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

 



The patch titled
     drivers/ata: correct a wrong free function for sata_nv driver
has been removed from the -mm tree.  Its filename was
     drivers-ata-correct-a-wrong-free-function-for-sata_nv-driver.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: drivers/ata: correct a wrong free function for sata_nv driver
From: "Peer Chen" <pchen@xxxxxxxxxx>

For sata_nv driver in kernel 2.6.21 onward, Inside nv_init_one(),use 'hpriv
= devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL);' but using the
kfree(hpriv) to free that data struction in nv_remove_one(), which will
cause system hang when removing the sata_nv module.

Change the 'kfree()' function to 'devm_kfree' will fix this bug.

Signed-off-by: Peer Chen <pchen@xxxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/ata/sata_nv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/ata/sata_nv.c~drivers-ata-correct-a-wrong-free-function-for-sata_nv-driver drivers/ata/sata_nv.c
--- a/drivers/ata/sata_nv.c~drivers-ata-correct-a-wrong-free-function-for-sata_nv-driver
+++ a/drivers/ata/sata_nv.c
@@ -1613,7 +1613,7 @@ static void nv_remove_one (struct pci_de
 	struct nv_host_priv *hpriv = host->private_data;
 
 	ata_pci_remove_one(pdev);
-	kfree(hpriv);
+	devm_kfree(&pci_dev->dev, hpriv);
 }
 
 #ifdef CONFIG_PM
_

Patches currently in -mm which might be from pchen@xxxxxxxxxx are

drivers-ata-remove-the-wildcard-from-sata_nv-driver.patch
sata_nv-fix-fallout-of-devres-conversion.patch
drivers-ata-correct-a-wrong-free-function-for-sata_nv-driver.patch
drivers-ata-correct-a-wrong-free-function-for-sata_nv-driver-fix.patch
drivers-ata-add-sw-ncq-support-to-sata_nv-for-mcp51-mcp55-mcp61.patch
drivers-ata-add-sw-ncq-support-to-sata_nv-for-mcp51-mcp55-mcp61-fix.patch
drivers-ata-add-sw-ncq-support-to-sata_nv-for-mcp51-mcp55-mcp61-fix-tidy.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux