Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3768808pxt; Tue, 10 Aug 2021 10:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt+1CDbTTuy+dzOKBnmGruJ9ySnG/EbPEq23HZBQyRuKFFy7pr75LAFouE8QMdHlB1gNra X-Received: by 2002:a02:9a13:: with SMTP id b19mr28803639jal.37.1628618016599; Tue, 10 Aug 2021 10:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618016; cv=none; d=google.com; s=arc-20160816; b=HWkjvEXqmRCqQXFkWyy9fKZpxwOwPolSG8FvGoatRe37LhzM/b61oOlA6SvA2MvFYk dnncArFjPTUCQqbyAF8EmH5GCURkf38JTaXzXbBlLp57BwoDzfO6JXJ3vCLxpZRwRHMB +FB8wjMTSDmE+u1rCI8k6a+bRWgfAqHPuXF0XHNzvtgh8Ho37p4PgaHpHdWkh+x4oE5b /+xup28IAUhTzpkUPRTOYIbd322Y61wKKntuE1NBo/emAfkdK5eSQhwRDcFyKvTGy5eT jGHSTEzfpB7bHIDF3NuNvX0iA6KDWuttKIWaVbNeZsmFzIRBZ/3dVW/1kpw0G8FxXONU v+WQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9YxfIKHgrt3lbKqvQ+V0H5acKd2cN5dfrlQK9yN6whc=; b=npqjxlxHbpakx37THbCBsbOkPsiqrX6Zhzx7aqDmToZpi/JrQRyIUoV8P/+yLlPufY xmAkrRDaLZXZoELkX79j+rThQsF4XbsMWmhA2DIpgj0DsWsAEDQiF0ljrQfCkWlviNFN NRR+MX7Dszgk/8SL3u3eH9Pis+xGcvOZ0Mxsb/hesDULmgYjuAZmd1Y0URBpmAlhmgix EraGHq8pK+iXtoSlDNQ7BKNafpLd0MTGZeSNENoZPfkjEh6fgZsZk+czg6zPbeZbJlZN AjB6Cu+Ce/tdaYbRbPG2zOEV/zr3/klT/vuUgR27R3wvmqpaGHux/mCp8T+pRKJaxbyO KAvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="r/jTwvO0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n25si9662824ioz.84.2021.08.10.10.53.24; Tue, 10 Aug 2021 10:53:36 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="r/jTwvO0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236569AbhHJRxG (ORCPT + 99 others); Tue, 10 Aug 2021 13:53:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:58770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236918AbhHJRtw (ORCPT ); Tue, 10 Aug 2021 13:49:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0465861184; Tue, 10 Aug 2021 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617319; bh=p+gzQ+WKbIpItmotzJJu2xF1GeLryVr5wMxaDXE+aKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r/jTwvO0ZjeAXR/Klz3ZEz3+lbV/MUUzR1juIyXu0vTnVgTWyARM9hVMwiFG07Gye uUu+cWNbS51m0Z+3BUUjc3zbunOUJbtrnxeRfn2ikTZdelhSJlNpsrgVFbSr+M5RGD FhU4H297EqKsfKv9WWRm3FDJarMlRFHJihB5AJaI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Georgi Djakov Subject: [PATCH 5.10 115/135] interconnect: Fix undersized devress_alloc allocation Date: Tue, 10 Aug 2021 19:30:49 +0200 Message-Id: <20210810172959.703172302@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King commit 85b1ebfea2b0d8797266bcc6f04b6cc87e38290a upstream. The expression sizeof(**ptr) for the void **ptr is just 1 rather than the size of a pointer. Fix this by using sizeof(*ptr). Addresses-Coverity: ("Wrong sizeof argument") Fixes: e145d9a184f2 ("interconnect: Add devm_of_icc_get() as exported API for users") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210730075408.19945-1-colin.king@canonical.com Signed-off-by: Georgi Djakov Signed-off-by: Greg Kroah-Hartman --- drivers/interconnect/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -403,7 +403,7 @@ struct icc_path *devm_of_icc_get(struct { struct icc_path **ptr, *path; - ptr = devres_alloc(devm_icc_release, sizeof(**ptr), GFP_KERNEL); + ptr = devres_alloc(devm_icc_release, sizeof(*ptr), GFP_KERNEL); if (!ptr) return ERR_PTR(-ENOMEM);