* [PATCH] scsi_debug: Fix memory leak if LBP enabled and module is unloaded
@ 2016-10-26 15:22 Ewan D. Milne
2016-10-26 16:56 ` Laurence Oberman
2016-10-27 2:11 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Ewan D. Milne @ 2016-10-26 15:22 UTC (permalink / raw)
To: linux-scsi
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi_debug: Fix memory leak if LBP enabled and module is unloaded
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
2016-10-27 2:11 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Laurence Oberman @ 2016-10-26 16:56 UTC (permalink / raw)
To: Ewan D. Milne; +Cc: linux-scsi
----- 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi_debug: Fix memory leak if LBP enabled and module is unloaded
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
@ 2016-10-27 2:11 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-10-27 2:11 UTC (permalink / raw)
To: Ewan D. Milne; +Cc: linux-scsi
>>>>> "Ewan" == Ewan D Milne <emilne@redhat.com> writes:
Ewan> map_storep was not being vfree()'d in the module_exit call.
Applied to 4.9/scsi-fixes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-27 2:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-10-27 2:11 ` Martin K. Petersen
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.