Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3528409pxf; Mon, 15 Mar 2021 11:33:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVme+EI2T1SjIepNkFV+NOoBoCK6sqyVtvzJ47O1cTaDnfvellnRd81Jno/PR1jGGuDTrP X-Received: by 2002:a05:6402:4244:: with SMTP id g4mr19923872edb.204.1615833237954; Mon, 15 Mar 2021 11:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833237; cv=none; d=google.com; s=arc-20160816; b=x3xCk7JhKzhbLmTQVlcfEUI90HdJg/8YWgrHGNrfIlYXd/mSchXK7+k/yLH8GC8/KT xhFEiFEOHLhS2k2XO+RNlOPYqJujxl4FY4FvUohiDU2q34T63FIS3ZW+poN4T5qyZeHc i45kJ6RkKIDKMc/KAZbVOkwWEc93nCczEwLhfmdj6tl2zu7/O/NtrKYUzliD2w0t7rMW pq2NrSphfBZP+jNdbwwl5pTplE49kpwuQ0dboe4khoAblqigbQb71lY2NiC9JTNn+t4y msxEjNZOePHaACbFyMm0Mb67gPQdUFbH0mGVkCKKpHL34iRkKdXfebmPalHxJpJwmsGB SV4Q== 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=LSZ0nCL5AE3Y85RQVpeACYE26DDHK6iofZWgOQc4mTU=; b=kDkfO+6ergC4QsV5ziJOrlersRQzHs46inb2v59PAAS2QaZc6S/sbzwmFmnsBatbD/ 2LOa8MMTFU4fRDJI4dtXGTnV6bWV79HJYp2ypqnUD+3zdKe/D1kKNjA6R16bgyoOLRtt wSIev0L8Oa13jWtKi3Rp1J/wmQqsws+64d1o9keNQ+CblXa7nJDwOUb/I4l4TyCy/L/Y lHnoZ6r+ZTvaA2QEOKiDw1/uaF+LEwtla4BbLIlLsgHMr9QVBuCM4BkJotERZC0H5MVn i9+1jhQBIc+iFjabSq4CK6duYbhctJjIcWlzMLQjDK1v5/K/R3YU+VnXuRGql3VMjvx3 sxJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=miNxdrdQ; 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 r3si11541439eja.625.2021.03.15.11.33.35; Mon, 15 Mar 2021 11:33:57 -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=miNxdrdQ; 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 S234404AbhCOOnC (ORCPT + 99 others); Mon, 15 Mar 2021 10:43:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:49718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234466AbhCOODY (ORCPT ); Mon, 15 Mar 2021 10:03:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5646764EEF; Mon, 15 Mar 2021 14:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615817004; bh=53IlfbVNqOlyDdD4cFDUvx5We7nCRPWzMldJuRJZDQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=miNxdrdQpySSLWLHhuMyUl0l/9w4jypCK3zYUPWBV8Ki5C7QXLUaEtLHnO9NONsO9 l8C3cAGxjqooG9hJy/GXy4WI2n0CqkH5DxVclzhKM3ZdZV35eo5bFzZpwm1MkgHucf sdsXrWXVSI5d1lTWLv+ycKVWYVYpAYzN3u7Bs+NU= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Dan Carpenter , Shawn Guo , Viresh Kumar , Sasha Levin Subject: [PATCH 5.10 242/290] cpufreq: qcom-hw: fix dereferencing freed memory data Date: Mon, 15 Mar 2021 14:55:35 +0100 Message-Id: <20210315135550.188289628@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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: Greg Kroah-Hartman From: Shawn Guo [ Upstream commit 02fc409540303801994d076fcdb7064bd634dbf3 ] Commit 67fc209b527d ("cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks") introduces an issue of dereferencing freed memory 'data'. Fix it. Fixes: 67fc209b527d ("cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Shawn Guo Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 2726e77c9e5a..5cdd20e38771 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -368,7 +368,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) error: kfree(data); unmap_base: - iounmap(data->base); + iounmap(base); release_region: release_mem_region(res->start, resource_size(res)); return ret; -- 2.30.1