+ cciss-fix-memory-leak-in-cciss_init_one.patch added to -mm tree

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

 



The patch titled
     cciss: fix memory leak in cciss_init_one()
has been added to the -mm tree.  Its filename is
     cciss-fix-memory-leak-in-cciss_init_one.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cciss: fix memory leak in cciss_init_one()
From: Eric Dumazet <eric.dumazet@xxxxxxxxx>

commit 22bece00dc1f28dd3374c55e464c9f02eb642876 (cciss: fix regression
firmware not displayed in procfs) added a small memory leak in
cciss_init_one()

Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Cc: Mike Miller <mike.miller@xxxxxx>
Cc: Jens Axboe <jens.axboe@xxxxxxxxxx>
Cc: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
Cc: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: <stable@xxxxxxxxxx>

Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/block/cciss.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/block/cciss.c~cciss-fix-memory-leak-in-cciss_init_one drivers/block/cciss.c
--- a/drivers/block/cciss.c~cciss-fix-memory-leak-in-cciss_init_one
+++ a/drivers/block/cciss.c
@@ -3889,7 +3889,7 @@ static int __devinit cciss_init_one(stru
 	int j = 0;
 	int rc;
 	int dac, return_code;
-	InquiryData_struct *inq_buff = NULL;
+	InquiryData_struct *inq_buff;
 
 	if (reset_devices) {
 		/* Reset the controller with a PCI power-cycle */
@@ -4029,6 +4029,7 @@ static int __devinit cciss_init_one(stru
 		printk(KERN_WARNING "cciss: unable to determine firmware"
 			" version of controller\n");
 	}
+	kfree(inq_buff);
 
 	cciss_procinit(i);
 
@@ -4045,7 +4046,6 @@ static int __devinit cciss_init_one(stru
 	return 1;
 
 clean4:
-	kfree(inq_buff);
 	kfree(hba[i]->cmd_pool_bits);
 	if (hba[i]->cmd_pool)
 		pci_free_consistent(hba[i]->pdev,
_

Patches currently in -mm which might be from eric.dumazet@xxxxxxxxx are

linux-next.patch
cciss-fix-memory-leak-in-cciss_init_one.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