Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3015301pxu; Sat, 10 Oct 2020 16:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbjYfrgdlRCxAabOk1RzxiDErTrgP7Csv0GKzpnUXrFEDebGAhwIJvWYNq8vw5cDdIlNXM X-Received: by 2002:a17:906:c444:: with SMTP id ck4mr20106583ejb.398.1602371455562; Sat, 10 Oct 2020 16:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602371455; cv=none; d=google.com; s=arc-20160816; b=OlP3so2LPu5X01QaXciiE+ZEfkbD4Bn+4jfOeSOH5RWoJu6z2GukYv7vznL2Vi7Cv5 W9VjFxcjqgcY3DDkOTInFRtSA4GTNzXIo+uWBNW1dN+MQGdPnUrbiloKTiFs0bk90t+D VqVrAqFIFTNlJFVSavp06tz8meESouSC1qutajcTzkH+tLZYIzaJ3yo93tCYqkt51o2i AeDpEEuvGN9qe30+Qquzk0S9Y9WU0UMWWRa6P7oP50sAMcXv+8XPkTHCZwTJfURj06zp PrufUKGmTf1IYrBQwepEyt5VnLBt3MY2C2w5izmNe6koy6vGvxnHixnsxSuZX8AoKF8W Bfzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Dfx2jAnXa8og88XZsgWHxQZ7FkGRUkp7xLAQVJxDCh4=; b=tfkJ2Rm+NHAdch94AWbZ7gdiV6Z4PbX2Y1kLhQELv9bwfQi4Z6DF7mvGlLPtmgMVax JLV0RenTFsA3bA3JHGgQRbsr55ZzAkBqWGoe8Y6/4y1gbKfaPwIGgnA5GBviofBfYagg TJ8AMrs65WFzmdpsByfcfbc0LAgRq02rPOYRzbOQq8hs4soBr8s7kLsZbo+bS/eYjEeb g5MjJ0XFMRb2yKQHNwwpNNN8qdWY3rGtLdSBEw6e0LyAsSrYlXQiNgjEDbkotbN/6LZH LLlpYmpeFa9UBHf+jj0UqtNkdzp5CY49l0JAWD8CoiKvpH+i3Rj9/ppWOAfQqbRSNWQ9 emTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si8562447eju.453.2020.10.10.16.10.31; Sat, 10 Oct 2020 16:10:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727752AbgJJW51 (ORCPT + 99 others); Sat, 10 Oct 2020 18:57:27 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:34147 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730092AbgJJSpa (ORCPT ); Sat, 10 Oct 2020 14:45:30 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kRI1w-0002nE-W1; Sat, 10 Oct 2020 16:47:37 +0000 From: Colin King To: Antoine Tenart , Herbert Xu , "David S . Miller" , Ofer Heifetz , linux-crypto@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: inside-secure: Fix sizeof() mismatch Date: Sat, 10 Oct 2020 17:47:36 +0100 Message-Id: <20201010164736.12871-1-colin.king@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Colin Ian King An incorrect sizeof() is being used, sizeof(priv->ring[i].rdr_req) is not correct, it should be sizeof(*priv->ring[i].rdr_req). Note that since the size of ** is the same size as * this is not causing any issues. Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes: 9744fec95f06 ("crypto: inside-secure - remove request list to improve performance") Signed-off-by: Colin Ian King --- drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index eb2418450f12..2e1562108a85 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -1639,7 +1639,7 @@ static int safexcel_probe_generic(void *pdev, priv->ring[i].rdr_req = devm_kcalloc(dev, EIP197_DEFAULT_RING_SIZE, - sizeof(priv->ring[i].rdr_req), + sizeof(*priv->ring[i].rdr_req), GFP_KERNEL); if (!priv->ring[i].rdr_req) return -ENOMEM; -- 2.27.0