mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>,
	Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>,
	Vijaya Mohan Guvva <vmohan@brocade.com>,
	"James E.J. Bottomley" <JBottomley@odin.com>,
	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
Date: Fri, 12 Jun 2015 17:09:57 +0200	[thread overview]
Message-ID: <20150612150957.GA18918@c203.arch.suse.de> (raw)
In-Reply-To: <1434063045-17480-1-git-send-email-khoroshilov@ispras.ru>

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 <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
> 

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
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)

      reply	other threads:[~2015-06-12 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 22:50 Alexey Khoroshilov
2015-06-12 15:09 ` Johannes Thumshirn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150612150957.GA18918@c203.arch.suse.de \
    --to=jthumshirn@suse.de \
    --cc=JBottomley@odin.com \
    --cc=anil.gurumurthy@qlogic.com \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sudarsana.kalluru@qlogic.com \
    --cc=vmohan@brocade.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®