linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi/mvsas: Fix memeleak when remove mvsas.ko.
@ 2012-08-01 10:21 majianpeng
  2012-10-15 10:08 ` Jianpeng Ma
  0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2012-08-01 10:21 UTC (permalink / raw)
  To: JBottomley; +Cc: 于向亮, linux-scsi

unreferenced object 0xffff8800a83d6e80 (size 64):
  comm "insmod", pid 10288, jiffies 4296886959 (age 662.587s)
  hex dump (first 32 bytes):
    01 04 01 00 00 00 00 00 00 00 a8 76 00 88 ff ff  ...........v....
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff815dd941>] kmemleak_alloc+0x21/0x50
    [<ffffffff81110763>] __kmalloc+0x153/0x240
    [<ffffffffa007e7da>] 0xffffffffa007e7da
    [<ffffffffa007ee71>] 0xffffffffa007ee71
    [<ffffffff812a08a5>] pci_device_probe+0x75/0xa0
    [<ffffffff8139c1e7>] driver_probe_device+0x77/0x230
    [<ffffffff8139c43b>] __driver_attach+0x9b/0xa0
    [<ffffffff8139a6fe>] bus_for_each_dev+0x4e/0x80
    [<ffffffff8139bd59>] driver_attach+0x19/0x20
    [<ffffffff8139b900>] bus_add_driver+0x180/0x280
    [<ffffffff8139c945>] driver_register+0x75/0x150
    [<ffffffff812a0640>] __pci_register_driver+0x50/0xc0
    [<ffffffffa003f086>] 0xffffffffa003f086
    [<ffffffff810001ba>] do_one_initcall+0x3a/0x160
    [<ffffffff8108a744>] sys_init_module+0xb04/0x1d10
    [<ffffffff816005a2>] system_call_fastpath+0x16/0x1b

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 drivers/scsi/mvsas/mv_init.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index cc59dff..cd9fc36 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -671,6 +671,7 @@ static void __devexit mvs_pci_remove(struct pci_dev *pdev)
 	}
 	kfree(sha->sas_phy);
 	kfree(sha->sas_port);
+	kfree(sha->lldd_ha);
 	kfree(sha);
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi/mvsas: Fix memeleak when remove mvsas.ko.
  2012-08-01 10:21 [PATCH] scsi/mvsas: Fix memeleak when remove mvsas.ko majianpeng
@ 2012-10-15 10:08 ` Jianpeng Ma
  0 siblings, 0 replies; 2+ messages in thread
From: Jianpeng Ma @ 2012-10-15 10:08 UTC (permalink / raw)
  To: scsi maintainers; +Cc: 于向亮, linux-scsi

On 2012-08-01 18:21 majianpeng <majianpeng@gmail.com> Wrote:
>unreferenced object 0xffff8800a83d6e80 (size 64):
>  comm "insmod", pid 10288, jiffies 4296886959 (age 662.587s)
>  hex dump (first 32 bytes):
>    01 04 01 00 00 00 00 00 00 00 a8 76 00 88 ff ff  ...........v....
>    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>  backtrace:
>    [<ffffffff815dd941>] kmemleak_alloc+0x21/0x50
>    [<ffffffff81110763>] __kmalloc+0x153/0x240
>    [<ffffffffa007e7da>] 0xffffffffa007e7da
>    [<ffffffffa007ee71>] 0xffffffffa007ee71
>    [<ffffffff812a08a5>] pci_device_probe+0x75/0xa0
>    [<ffffffff8139c1e7>] driver_probe_device+0x77/0x230
>    [<ffffffff8139c43b>] __driver_attach+0x9b/0xa0
>    [<ffffffff8139a6fe>] bus_for_each_dev+0x4e/0x80
>    [<ffffffff8139bd59>] driver_attach+0x19/0x20
>    [<ffffffff8139b900>] bus_add_driver+0x180/0x280
>    [<ffffffff8139c945>] driver_register+0x75/0x150
>    [<ffffffff812a0640>] __pci_register_driver+0x50/0xc0
>    [<ffffffffa003f086>] 0xffffffffa003f086
>    [<ffffffff810001ba>] do_one_initcall+0x3a/0x160
>    [<ffffffff8108a744>] sys_init_module+0xb04/0x1d10
>    [<ffffffff816005a2>] system_call_fastpath+0x16/0x1b
>
>Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
>---
> drivers/scsi/mvsas/mv_init.c |    1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
>index cc59dff..cd9fc36 100644
>--- a/drivers/scsi/mvsas/mv_init.c
>+++ b/drivers/scsi/mvsas/mv_init.c
>@@ -671,6 +671,7 @@ static void __devexit mvs_pci_remove(struct pci_dev *pdev)
> 	}
> 	kfree(sha->sas_phy);
> 	kfree(sha->sas_port);
>+	kfree(sha->lldd_ha);
> 	kfree(sha);
> 	pci_release_regions(pdev);
> 	pci_disable_device(pdev);
>-- 
>1.7.9.5
Hi  JBottomley,
	How about this patch?

Thanks!
Jianpeng

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-15 10:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 10:21 [PATCH] scsi/mvsas: Fix memeleak when remove mvsas.ko majianpeng
2012-10-15 10:08 ` Jianpeng Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).