public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] iscsi_boot_sysfs: Fix a memory leak in iscsi_boot_destroy_kset()
@ 2013-12-09  9:37 Ethan Zhao
  2013-12-09 21:30 ` Konrad Rzeszutek Wilk
  2013-12-10  0:16 ` Mike Christie
  0 siblings, 2 replies; 9+ messages in thread
From: Ethan Zhao @ 2013-12-09  9:37 UTC (permalink / raw)
  To: konrad.wilk, michaelc, pjones; +Cc: linux-kernel, Ethan Zhao

From: "Ethan Zhao" <ethan.kernel@gmail.com>

Load and unload iscsi_ibft module will cause kernel memory leak, fix it
in scsi/iscsi_boot_sysfs.c iscsi_boot_destroy_kset().

Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
---
 drivers/scsi/iscsi_boot_sysfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c
index 14c1c8f..680bf6f 100644
--- a/drivers/scsi/iscsi_boot_sysfs.c
+++ b/drivers/scsi/iscsi_boot_sysfs.c
@@ -490,5 +490,6 @@ void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset)
 		iscsi_boot_remove_kobj(boot_kobj);
 
 	kset_unregister(boot_kset->kset);
+	kfree(boot_kset);
 }
 EXPORT_SYMBOL_GPL(iscsi_boot_destroy_kset);
-- 
1.8.3.4 (Apple Git-47)


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

end of thread, other threads:[~2013-12-11 17:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09  9:37 [PATCH] [SCSI] iscsi_boot_sysfs: Fix a memory leak in iscsi_boot_destroy_kset() Ethan Zhao
2013-12-09 21:30 ` Konrad Rzeszutek Wilk
2013-12-10  6:03   ` Ethan Zhao
2013-12-10 14:11     ` Konrad Rzeszutek Wilk
2013-12-10 18:46       ` Mike Christie
2013-12-11 17:18         ` Konrad Rzeszutek Wilk
2013-12-11 17:19           ` Konrad Rzeszutek Wilk
2013-12-11  2:47       ` Ethan Zhao
2013-12-10  0:16 ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox