From patchwork Tue Oct 27 13:48:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 290183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F1F0C388F9 for ; Tue, 27 Oct 2020 14:02:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16B4C22263 for ; Tue, 27 Oct 2020 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807348; bh=9T3fmhDP9fbRpis3gFZIYBHFkl8wcQipp3vu7Aci1Xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=wc0ztkmDNX0CBdwgETH8q+AsGbs3FON5TG2KoMLUEov/Jy+LZHHvpvaBnWIRrYsP3 sH/Ogei/+7E6L6Pe/owlOXS5xQObY/1JWZE8K3ESo01XncIQepATYb2DXwleon1jgI 6qFq8B71Xt5880mghpwvX1Lv3N3tu6zWKFQMTYpY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753808AbgJ0OCT (ORCPT ); Tue, 27 Oct 2020 10:02:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:50148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2443171AbgJ0OCR (ORCPT ); Tue, 27 Oct 2020 10:02:17 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 569F4221F8; Tue, 27 Oct 2020 14:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807336; bh=9T3fmhDP9fbRpis3gFZIYBHFkl8wcQipp3vu7Aci1Xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ml7Q26j2Xht/k9touAcVIvihEUAHcGiTnURCsCIMnB7JmqvYKnX6GKFzSzc0a8pB9 7yvmrqOaFun4c3plqM/tqmbsg7q/hSuLufXwOrAADaX81733WypRl/f/fDEH1RWnXg +em0nDfQ6Y/n8Ge6vX5cnakBqGJEbPBIX7ohmmxA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Herbert Xu , Sasha Levin Subject: [PATCH 4.9 016/139] crypto: ixp4xx - Fix the size used in a dma_free_coherent() call Date: Tue, 27 Oct 2020 14:48:30 +0100 Message-Id: <20201027134902.918555052@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Christophe JAILLET [ Upstream commit f7ade9aaf66bd5599690acf0597df2c0f6cd825a ] Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()', in 'setup_crypt_desc()'. Fixes: 81bef0150074 ("crypto: ixp4xx - Hardware crypto support for IXP4xx CPUs") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/ixp4xx_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index b54af97a20bb3..a54de1299e9ef 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -532,7 +532,7 @@ static void release_ixp_crypto(struct device *dev) if (crypt_virt) { dma_free_coherent(dev, - NPE_QLEN_TOTAL * sizeof( struct crypt_ctl), + NPE_QLEN * sizeof(struct crypt_ctl), crypt_virt, crypt_phys); } return;