Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2312877ybg; Fri, 5 Jun 2020 10:40:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz++bLNfd2IfP9W80y7EkgnkmVJ/l+Ux4E0Ix95cwr79wdc2JZchJKzdv4+EP6Ec47vMrNg X-Received: by 2002:a17:906:b293:: with SMTP id q19mr10291665ejz.412.1591378828212; Fri, 05 Jun 2020 10:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591378828; cv=none; d=google.com; s=arc-20160816; b=i+xn/rHWBsG2rKJ9+3d8dAFSiZEHwHeNOtvEBu0GT6AUPtwmJ06rMJSn0IpTy/Mwq1 9EkbgLAIIEdvMYhzi6KJ1dLNz3X3EoY0hh+IHOZeIshZ5G5q4fGZFF6mF1fOAzJUXPtB HVkwzzYMwW2nm2GeBsMMEy7JKs1DEXmtI33gRMb4Myjgq0QI0ciUuYNelYeHodRbLICz hF9/V1P/FHjg4w1uHNsd8NIG+7i7pV54JPhWA//rQv08rmUUoz7kGnzbaqhkBWu0OiV8 ZlzE+b8wh5tE8tbkEEUA6c5mJN59BPajS6fVDUVQqTCvkj5vHLy+tzByfkmMs6fJhb+g NXpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=arv2xjh9BIH+SPIN4Yj/Lki3GqizeEVvxEcRGCN4wkw=; b=oYtTee0JJVRWgk50M8p/V4fHkHKvBUX0l0kbpvkGaAXZfyZFheanUB9ywiPuY0yMEM G7uBREd7saj4IUqka+Sid7EAIoevEQvm+EipUVcdBQ6xhZSO92evtCtHvXkjiU5sQ6YQ ZGATs0PBADHeMfxtTipvczFeZx0CuR1ZCeuNaXXiEX5b8NOhwZd2xznjuTh6UUCqvqBH ZTOxDzBwezpcZbO9/CCG7leXgMJXup1kksn/a5TtBZuThLch/St4y8kCa2Z90LB4PpP6 UFZI1DjrU3qKyD7ujGhrrWZlYCJwNnb3L0GIrd9YaigF6qGSudp/Izgxu5FCS3bsAM/8 0QUg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si4021551ejn.590.2020.06.05.10.40.05; Fri, 05 Jun 2020 10:40:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728025AbgFERiM (ORCPT + 99 others); Fri, 5 Jun 2020 13:38:12 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44461 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgFERiL (ORCPT ); Fri, 5 Jun 2020 13:38:11 -0400 Received: by mail-lj1-f193.google.com with SMTP id c17so12709371lji.11 for ; Fri, 05 Jun 2020 10:38:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=arv2xjh9BIH+SPIN4Yj/Lki3GqizeEVvxEcRGCN4wkw=; b=G2EieGm+EuMMSwy9D2koVme7QMxJCgOKGc169GwA+EcskoGpdRYHmOtEf2HzjGpI4T H2pNeZ1Uu6Udf7BDSBmKX84aze80Y14OPG/ZhRea7wH//4j6kohgEYWpUfsariwwdPRd 6fiqO/upIelEYRsOV9anBvbqGY52tg9DRadtNfgrVCWZ5hnqlkoLkGqm2h/El8oS4Aw4 qSxgFp9EubT6kCqNup4fSV5KPF2yN2TC04/jPNdoTFp7ld5rkig2WotoA+C2zJKLzHRa 0amwBFqkQZgS1DXRWT2/RWfcH/fNPQi2Rjwd1+aaXJzeQmwnSgASrBxbMuy2ReihPE96 PT/A== X-Gm-Message-State: AOAM531VGuiF1mb4d2tP28awrv2eC6T6k3so+tWCm5RWTzoKDqG7ZiE2 awULywy6ZZ/UlfkpRvlBbKQ= X-Received: by 2002:a2e:890d:: with SMTP id d13mr5404553lji.75.1591378689131; Fri, 05 Jun 2020 10:38:09 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id w1sm1049514ljo.80.2020.06.05.10.38.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 10:38:08 -0700 (PDT) From: Denis Efremov To: Leo Li Cc: Denis Efremov , David Airlie , Daniel Vetter , Krunoslav Kovac , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp() Date: Fri, 5 Jun 2020 20:37:44 +0300 Message-Id: <20200605173744.68500-2-efremov@linux.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605173744.68500-1-efremov@linux.com> References: <20200605173744.68500-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kfree() instead of kvfree() to free rgb_user in calculate_user_regamma_ramp() because the memory is allocated with kcalloc(). Signed-off-by: Denis Efremov --- Looks like this kvfree is from merge conflict between 1fafef9dfe12 ("Merge drm-fixes-for-v4.17-rc6-urgent into drm-next") and 6396bb221514 ("treewide: kzalloc() -> kcalloc()"). I'm not adding cc to stable because the bug looks harmless. You can squash the commits if you want. drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c index 56bb1f9f77ce..bcfe34ef8c28 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -1777,7 +1777,7 @@ bool calculate_user_regamma_ramp(struct dc_transfer_func *output_tf, kfree(rgb_regamma); rgb_regamma_alloc_fail: - kvfree(rgb_user); + kfree(rgb_user); rgb_user_alloc_fail: return ret; } -- 2.26.2