mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] bfa: fix leak of bfad_im_port_index on module unload
@ 2015-06-11 22:50 Alexey Khoroshilov
  2015-06-12 15:09 ` Johannes Thumshirn
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2015-06-11 22:50 UTC (permalink / raw)
  To: Anil Gurumurthy, Sudarsana Kalluru, Vijaya Mohan Guvva
  Cc: Alexey Khoroshilov, James E.J. Bottomley, linux-scsi,
	linux-kernel, ldv-project

Resources allocated within bfad_im_port_index idr are not deallocated
on module unload. The patch adds idr_destroy() in exit function.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/scsi/bfa/bfad_im.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c
index 7223b0006740..8367c11d554b 100644
--- a/drivers/scsi/bfa/bfad_im.c
+++ b/drivers/scsi/bfa/bfad_im.c
@@ -851,6 +851,8 @@ bfad_im_module_exit(void)
 
 	if (bfad_im_scsi_vport_transport_template)
 		fc_release_transport(bfad_im_scsi_vport_transport_template);
+
+	idr_destroy(&bfad_im_port_index);
 }
 
 void
-- 
1.9.1


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

end of thread, other threads:[~2015-06-12 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 22:50 [PATCH] bfa: fix leak of bfad_im_port_index on module unload Alexey Khoroshilov
2015-06-12 15:09 ` Johannes Thumshirn

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

all inboxes | Powered by JetHome®