Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp910472imp; Thu, 21 Feb 2019 13:56:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ+Or0bnkqH1WJ0I25wzaPWB+R/ihKwyrUhoJaYKIt7lubCf75DD7tQ3jdzRzO2vRhP7IVk X-Received: by 2002:a63:b24a:: with SMTP id t10mr620113pgo.223.1550786212089; Thu, 21 Feb 2019 13:56:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550786212; cv=none; d=google.com; s=arc-20160816; b=WK8XAk8+hdYsiToDRdqdxI+I8O9EhmOmzfOpxKn1b3RU9wd88OH/vP7fUh0UA9HHmd a7vAiLoly0HxU6vTWLwiUUbL1SEKHZVikgNNuf8luJ1RfGJM+aRZ6JnSJtjGDJkMa0yZ j48CZbE7gj1kJXwvFUZd5FnQ8l1tee14OFtmoPCWJjMgEQqdZckKOIUPv+qC5lL1frR2 u8GS3N9W8YBTf784f2VfrYQqTwUcyn5DxOTx8U9yHfptWBOAO/3dyVr+gULym+euatt0 hX0q1q2CmlQudHdKffDaqEmODpiMyP6uPFJFi+ryPnfchXOLGpQBPbwzRI2M2jiVhlQH RP2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=fCjZ8fdeOvbFhz4g0bJDBLi5EElpqb5MnUIngyUkS9U=; b=SZx30cWWGsUxJWqCouxLeFcQHESfblgydsWdlhGzH1uRhuwaX0wlE9nPBc0O7H05qW lJi9yV6qUxXHb3dIz6wCJu5iv6yNgHBxnouRSvlQV3vByJZgFyDhRAdkHxoUy621YHl5 nH5nME+z4p5s2E7BkXeWw/VEycpL6UF46dzoB88yy9eVpmXNZrLm/fvJ1fY2bIaHl754 28efvHb2idRMHmKXsbGoVpMwS2M47tfXnDBOJkW04DKFvGdcan9znaOQBLq3RH6hWi6e LsETFZU1974U23IB/sy5Hy+7DwWdj7ejB83oXfpqc+9v6kx/YJAh6wJVan+qY+ksZMIn puvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=n5NooLxH; dkim=pass header.i=@codeaurora.org header.s=default header.b=n5NooLxH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 y22si18314pll.105.2019.02.21.13.56.35; Thu, 21 Feb 2019 13:56:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=n5NooLxH; dkim=pass header.i=@codeaurora.org header.s=default header.b=n5NooLxH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726755AbfBUVyg (ORCPT + 99 others); Thu, 21 Feb 2019 16:54:36 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:51006 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbfBUVyf (ORCPT ); Thu, 21 Feb 2019 16:54:35 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AF30D608CE; Thu, 21 Feb 2019 21:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550786074; bh=t1Wo67g3zmG34hoxKco1zuOm2XBuz0VbUZXozrjpAlE=; h=From:To:Cc:Subject:Date:From; b=n5NooLxHFMviq2Qsank2RDZwFExiEHzvTnWRD2aalDfKq/en+9gst8WDRBF4vXNtR l3Ar0UHUT+8g3XWvwye+DsuEpw9jqKbZfXJDsSRGVRRReGWxb20I6WdkZXmqAWDjzz VEWISUKD9Jzy8Zjbs/XqDC5Yj8ScM9mxspAzW+h4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from jcrouse1-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5D79C6071B; Thu, 21 Feb 2019 21:54:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550786074; bh=t1Wo67g3zmG34hoxKco1zuOm2XBuz0VbUZXozrjpAlE=; h=From:To:Cc:Subject:Date:From; b=n5NooLxHFMviq2Qsank2RDZwFExiEHzvTnWRD2aalDfKq/en+9gst8WDRBF4vXNtR l3Ar0UHUT+8g3XWvwye+DsuEpw9jqKbZfXJDsSRGVRRReGWxb20I6WdkZXmqAWDjzz VEWISUKD9Jzy8Zjbs/XqDC5Yj8ScM9mxspAzW+h4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5D79C6071B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, stable@vger.kernel.org, Sean Paul , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Clark , David Airlie , Daniel Vetter Subject: [PATCH] drm/msm: Fix incorrect struct size for memory allocation Date: Thu, 21 Feb 2019 14:54:29 -0700 Message-Id: <1550786069-18328-1-git-send-email-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The allocation for the clock bulk data does a classic sizeof(pointer) instead of sizeof(struct) so the array ends up incorrectly sized for the clock data. Cc: stable@vger.kernel.org Fixes: 8e54eea ("drm/msm: Add a helper function to parse clock names") Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 906b2bb..31e1481 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -96,7 +96,7 @@ int msm_clk_bulk_get(struct device *dev, struct clk_bulk_data **bulk) if (count < 1) return 0; - local = devm_kcalloc(dev, sizeof(struct clk_bulk_data *), + local = devm_kcalloc(dev, sizeof(struct clk_bulk_data), count, GFP_KERNEL); if (!local) return -ENOMEM; -- 2.7.4