Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp166606ybe; Tue, 3 Sep 2019 20:04:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwq0uWiy4Bc9nD+0u/niA/TimI99+eqUNAp++Tl7ENvtgRhZkYMYjQLcWQDHbRxuk2RRXce X-Received: by 2002:aa7:8a13:: with SMTP id m19mr20732526pfa.228.1567566279282; Tue, 03 Sep 2019 20:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567566279; cv=none; d=google.com; s=arc-20160816; b=ooYB1uNkyYQeit4dneHU9Njad9QpREDFfLqb1rOjH+ZENyKcqDK5ixsPZOtB9aQmqA gTnQIkL/DwaCvzv9FbKu5OOJVYLr2ZyOUOQZht6R/vYzUDVsBHnoIBHeeOzlx9XYdVhl gAbkNwifvzlbOY8mvtm+nHurKtZzjR7TgtTLRVSjM7yCRYmoc20KWf1XIRKFr+qvqYa2 otJDQhvUI+2v4k3Thkff26w7RytV3vEpvuAoYK+JFStNWZGKOYXrNQWS2bKrI2bPAP+D hzSYcfOGo2ts3B55aanVUoRr+WZiPuJQMJajWw0TH9ioIPzdMWxXEiGdfNSBRkT1d80u DQRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=vrWAVLcTUmcVMTV3ExWSdkCQUW0jPj8N572a5YtJ8XY=; b=iVyZwIkX8PXQvaxuC4exI3Qm5GKsn/PufzvLepJZ4fRIJu7/BFCLbbaqRQf9fgDG72 8djweRDHGeLBbZUn9ovKr7Aovt0/AzRQIiITHpVg9PkBpg6dvqPo26Ps+rosHpCla9ca d1IDT7Eid9l+CNYFrCzhZbw2gZwl8/25KejNtTt/VvYLxTqy79/2D02+IFAVZX1Jms61 RXUWFl1TMCy7nAc0QoW3L8ohKAXn4wPxXGAXMBFgc1hBgKFpt3zPie5E6E1rVmUUJGPx /y8lHuuOd7TuwqqFcKdw5qtuiBI9GOu8ZmQRYqmKjrUQ4mWYsfauyEqv6Zd/tyPgEk0M GqxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si19326533pfb.252.2019.09.03.20.04.24; Tue, 03 Sep 2019 20:04:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727709AbfIDDEX (ORCPT + 99 others); Tue, 3 Sep 2019 23:04:23 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33988 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727701AbfIDDEX (ORCPT ); Tue, 3 Sep 2019 23:04:23 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ACDD0E8BC4200A95E5CD; Wed, 4 Sep 2019 11:04:21 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 11:04:14 +0800 From: zhong jiang To: , , , , CC: , , , Subject: [PATCH 1/3] crypto: marvell: Use kzfree rather than its implementation Date: Wed, 4 Sep 2019 11:01:17 +0800 Message-ID: <1567566079-7412-2-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1567566079-7412-1-git-send-email-zhongjiang@huawei.com> References: <1567566079-7412-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Use kzfree instead of memset() + kfree(). Signed-off-by: zhong jiang --- drivers/crypto/marvell/hash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c index 0f0ac85..a2b35fb 100644 --- a/drivers/crypto/marvell/hash.c +++ b/drivers/crypto/marvell/hash.c @@ -1148,8 +1148,7 @@ static int mv_cesa_ahmac_pad_init(struct ahash_request *req, } /* Set the memory region to 0 to avoid any leak. */ - memset(keydup, 0, keylen); - kfree(keydup); + kzfree(keydup); if (ret) return ret; -- 1.7.12.4