Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755381AbbFLPKJ (ORCPT ); Fri, 12 Jun 2015 11:10:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41553 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752713AbbFLPKG (ORCPT ); Fri, 12 Jun 2015 11:10:06 -0400 Date: Fri, 12 Jun 2015 17:09:57 +0200 From: Johannes Thumshirn To: Alexey Khoroshilov Cc: Anil Gurumurthy , Sudarsana Kalluru , Vijaya Mohan Guvva , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: Re: [PATCH] bfa: fix leak of bfad_im_port_index on module unload Message-ID: <20150612150957.GA18918@c203.arch.suse.de> References: <1434063045-17480-1-git-send-email-khoroshilov@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1434063045-17480-1-git-send-email-khoroshilov@ispras.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1413 Lines: 41 On Fri, Jun 12, 2015 at 01:50:45AM +0300, Alexey Khoroshilov wrote: > 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 > --- > 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 > Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG N?rnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/