From: Laurence Oberman <loberman@redhat.com>
To: "Ewan D. Milne" <emilne@redhat.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_debug: Fix memory leak if LBP enabled and module is unloaded
Date: Wed, 26 Oct 2016 12:56:05 -0400 (EDT) [thread overview]
Message-ID: <836409948.4605193.1477500965467.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1477495373-1179-1-git-send-email-emilne@redhat.com>
----- Original Message -----
> From: "Ewan D. Milne" <emilne@redhat.com>
> To: linux-scsi@vger.kernel.org
> Sent: Wednesday, October 26, 2016 11:22:53 AM
> Subject: [PATCH] scsi_debug: Fix memory leak if LBP enabled and module is unloaded
>
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> map_storep was not being vfree()'d in the module_exit call.
>
> Signed-off-by: Ewan D. Milne <emilne@redhat.com>
> ---
> drivers/scsi/scsi_debug.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index c905709..cf04a36 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
> @@ -5134,6 +5134,7 @@ static void __exit scsi_debug_exit(void)
> bus_unregister(&pseudo_lld_bus);
> root_device_unregister(pseudo_primary);
>
> + vfree(map_storep);
> vfree(dif_storep);
> vfree(fake_storep);
> kfree(sdebug_q_arr);
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Looks fine
Reviewed-by: Laurence Oberman <loberman@redhat.com>
next prev parent reply other threads:[~2016-10-26 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 15:22 [PATCH] scsi_debug: Fix memory leak if LBP enabled and module is unloaded Ewan D. Milne
2016-10-26 16:56 ` Laurence Oberman [this message]
2016-10-27 2:11 ` Martin K. Petersen
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=836409948.4605193.1477500965467.JavaMail.zimbra@redhat.com \
--to=loberman@redhat.com \
--cc=emilne@redhat.com \
--cc=linux-scsi@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.