Re: [PATCH] scsi: storvsc: Remove memset before memory freeing in storvsc_suspend()

2020-06-09 Thread Martin K. Petersen
On Fri, 5 Jun 2020 10:59:34 +0300, Denis Efremov wrote:

> Remove memset with 0 for stor_device->stor_chns in storvsc_suspend()
> before the call to kfree() as the memory contains no sensitive information.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: storvsc: Remove memset before memory freeing in storvsc_suspend()
  https://git.kernel.org/mkp/scsi/c/f47c24033a1a

-- 
Martin K. Petersen  Oracle Linux Engineering


RE: [PATCH] scsi: storvsc: Remove memset before memory freeing in storvsc_suspend()

2020-06-05 Thread Dexuan Cui
> From: Denis Efremov 
> Sent: Friday, June 5, 2020 1:00 AM
> To: Dexuan Cui ; Michael Kelley
> 
> Cc: Denis Efremov ; James E . J . Bottomley
> ; Martin K . Petersen ;
> linux-hyp...@vger.kernel.org; Linux SCSI List ;
> Linux Kernel Mailing List 
> Subject: [PATCH] scsi: storvsc: Remove memset before memory freeing in
> storvsc_suspend()
> 
> Remove memset with 0 for stor_device->stor_chns in storvsc_suspend()
> before the call to kfree() as the memory contains no sensitive information.
> 
> Fixes: 56fb10585934 ("scsi: storvsc: Add the support of hibernation")
> Suggested-by: Dexuan Cui 
> Signed-off-by: Denis Efremov 
> ---
>  drivers/scsi/storvsc_drv.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 072ed8728657..2d90cddd8ac2 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -2035,9 +2035,6 @@ static int storvsc_suspend(struct hv_device
> *hv_dev)
> 
>   vmbus_close(hv_dev->channel);
> 
> - memset(stor_device->stor_chns, 0,
> -num_possible_cpus() * sizeof(void *));
> -
>   kfree(stor_device->stor_chns);
>   stor_device->stor_chns = NULL;
> 
> --

Denis, thank you for fixing this!

Reviewed-by: Dexuan Cui