Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1932912ybg; Fri, 5 Jun 2020 01:04:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQkU0N7bwgp71qWMzL6GOgbHwcYvushhpL6HVIW349nw9wvc3KI15BYqhnLl0lyKsbH2Q7 X-Received: by 2002:a17:906:1196:: with SMTP id n22mr7358954eja.33.1591344244053; Fri, 05 Jun 2020 01:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591344244; cv=none; d=google.com; s=arc-20160816; b=XUj5LtRANZSsijT/2iDZPYxTsrqYkvHH092I31d+6vXvr75qQOLmpBA1ZjG3ckGnIH JpjYoRLSux2NCr5FnVvVm+zpiPz5/F/D9uO4eGi8alMrFh8WrbZSYHcJTUNro2rc0Vod opDxF/MWzCirpQb22nEJ4B9fFNFSOKRo+V9g/hF/fvCaXIy/ak1Kl2SLS0n1NigotPyT EZpTUtPJzvofDOpMyqc0/YT8GybOGgwkz2+V8QuqF/seDCrRSzHnGSedBvloA4WyhsVE p3mXQC/hKaS68YJi3RHiMpCSIFx+lcbXwBlnrH1WKQVK5XqCP+KGuECYBbRe+IWS3yOq FJkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=76On/DuswXUwHpVdv2b9W5T6CYfTi3YXauiy+oGqoso=; b=rLsIsD5UMxPuYGjzVzncUaNI/5Kly4YlyyMpelKentToBf6XBSO2Z+OUE3hmM/XT7M FpIThgMEl5IKWZdYIHfUc7oQTxDNRFZraDWyEQ441enZayIroZyzltrv6IGJhBGTmvbB bI1dZzKQDee+l6PGvfqo+RXkyqjL1IYh4MUlDhn5rrjUKfpWcPHNQSAioY1Mp5V1dKWp zp+1ruyWV6728NkGdFFvFXo+e6YjZL0f9SlvTOFd6qO9zAzLAwFBRymKJBuC0C9gK525 dKRPi8f5gJrn4t2I+GR6J/UtmDvdic9Y4W//VQSSnaouhTmQzeRa8OoQOPXSFkAGrhhF H9gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si3221950eds.422.2020.06.05.01.03.40; Fri, 05 Jun 2020 01:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726134AbgFEH7k (ORCPT + 99 others); Fri, 5 Jun 2020 03:59:40 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41101 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725280AbgFEH7j (ORCPT ); Fri, 5 Jun 2020 03:59:39 -0400 Received: by mail-lj1-f196.google.com with SMTP id 9so10561206ljc.8; Fri, 05 Jun 2020 00:59:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=76On/DuswXUwHpVdv2b9W5T6CYfTi3YXauiy+oGqoso=; b=Y59MDwtkCib2cL96VDY0ByOXDqheBH1JDba8EfUM/1nQ+nlGr+FE0VpaWt3O8fXNxz YtlKlDMS2kXca67cH9lQ6gztSmgOGUj8NIi4VXiElqaLG6MBulrN/HiPtdpdXBJyYAXE FZ8e7+0OEa8hVwmOJe6fc2UDrqhQfiV3+psmtjRQfJlQlmyEgsFro5DIKRrP6lPDdcS2 yyCOXTulyrrdtdKJ1kQdSl9uTVnKfvf09FrAc2DICw8reH3ioKnMLAeDxJYWLehDN9hy NnefwMEuRoNQLv42Y0BtvX+LSadiTdJRD+bRfuqbaeHjshn8sY5tuVTa6WcDO2oMB1ks zF5g== X-Gm-Message-State: AOAM530adVKNFxsPC6AoVen4JDcZblsYd7Lm9TfxK/ptAShsfpGfavE7 zQKATxH3Nx3jEkOYpbriueU= X-Received: by 2002:a2e:b5ca:: with SMTP id g10mr4357629ljn.370.1591343977025; Fri, 05 Jun 2020 00:59:37 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id a9sm230697ljk.116.2020.06.05.00.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 00:59:36 -0700 (PDT) From: Denis Efremov To: Dexuan Cui , Michael Kelley Cc: Denis Efremov , "James E . J . Bottomley" , "Martin K . Petersen" , linux-hyperv@vger.kernel.org, Linux SCSI List , Linux Kernel Mailing List Subject: [PATCH] scsi: storvsc: Remove memset before memory freeing in storvsc_suspend() Date: Fri, 5 Jun 2020 10:59:34 +0300 Message-Id: <20200605075934.8403-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.26.2