Message ID | 20221214131617.2447-4-johan+linaro@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp214810wrn; Wed, 14 Dec 2022 05:22:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf7n+Wu8hyLEYp5eDdrjB5WyHRxqgp8H6r2Q/OIkL/xPyXFjaIzHmHr/hHepeXyrGqLRJTIO X-Received: by 2002:a17:906:d18f:b0:7b2:75c6:6d3c with SMTP id c15-20020a170906d18f00b007b275c66d3cmr20420197ejz.74.1671024127863; Wed, 14 Dec 2022 05:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671024127; cv=none; d=google.com; s=arc-20160816; b=K8D5noHLKJUXXfPU5+fy9rWw/iO7s/3jSHjaNinNqGET+FmuJY5qsE44k20fOF4d36 7UWhvrkEW6xMgMUjn2rZzrpPdvb0E8RCNB4kbsLOovQcGohNLx0x2QtFZZKHHWg20mhW dxmMjRLY97o+/69cnoiigUHYMA01VMsgJAC1shU+jmMrl5bqyRv6LUazqDOOPTq7dWE5 +3zAAswSTLx70YUjAzTbbDwe81J89VD9RSAAkUxgbS5jU38Tbz446Wq5RPs6zSNt/oXL 5DOX+U7e3R7tY8h537mYy80pE1+qPUBGSfAwxlVYJdUfDP04Wy8EdXTA8Vf+aBxdDSXX VC/A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QljZUV13XD4olbDUKuz1zm2aCzLRxJJCfhe3kR1SKRs=; b=NfkSXh6p54/co59zDMLiKTWqseWLH48rnbeAziQWly6fjRufPkwEtrYDpMr4CP6TyQ XHx8TcC6y8EJVeNajaGP5swC2mOfUAs0cdpHFsbfCuHiC5plbOu1Q/pm6rDr3ouhryqV pEQU0Ev8njK4+PUSdKbIQ7Okw12TJZ59XJR2O0A3YAcIA3rbwL83Xoty7D4XvbBv4RnR wJb1iuk+BQTFrpgqgL3YuFYiPA3n+S/iRXDYWKH9/YK0z15eQ1Ox4djGFuG4Lb2yPi5J RycP/eX8eiD7YULzNBDFA61D4UT1s4SXC2uuP4/uwUz7etg0H5bGAH5bePAaYay6rmgF Mhuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z4tNaPYh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga8-20020a1709070c0800b007c10bb9225bsi12208075ejc.975.2022.12.14.05.21.43; Wed, 14 Dec 2022 05:22:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z4tNaPYh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238615AbiLNNTW (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Wed, 14 Dec 2022 08:19:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238496AbiLNNS7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 14 Dec 2022 08:18:59 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 003D2205CD; Wed, 14 Dec 2022 05:18:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B3F66B818B6; Wed, 14 Dec 2022 13:18:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 501A3C433AA; Wed, 14 Dec 2022 13:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671023934; bh=pUvEkaZ93TrgdiMPgbWAhQQFmdmtaGqKxLqih4iKcMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z4tNaPYhQ+umQ4W+AIlhusLg33i3tL1Gzd+nFpK3a5GHUosvVNTKfE0eJCahr7dE1 CURwKN+RXbUdavJnJhKY3PDISjPRiiwBvEpmC2SFEkdO+6yS2GPi9UCXXjWnH590uR MGGSLN2uIftEE8nVGaZeyydpxpUIDRddNRdmaq59jH63UYufTlNQ0p5u+CwbLxFpKd /Pg7Ba/xUdWIxSBuUvLKeA2+qWEx96ZYaEXrvsikDfaiF82URpzZT7F07RVImf90Ay sDfZj/sR8i1I4Wy3CVA+3GVBZXe6ybbozYBy8+sCz2CGT4albApv6ipWn2qJZJBvz4 jksoqniLJGFFQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1p5RfO-0000gM-KX; Wed, 14 Dec 2022 14:19:22 +0100 From: Johan Hovold <johan+linaro@kernel.org> To: Daniel Lezcano <daniel.lezcano@linaro.org>, "Rafael J. Wysocki" <rafael@kernel.org> Cc: Amit Kucheria <amitk@kernel.org>, Thara Gopinath <thara.gopinath@gmail.com>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Zhang Rui <rui.zhang@intel.com>, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Alim Akhtar <alim.akhtar@samsung.com>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, Johan Hovold <johan+linaro@kernel.org> Subject: [PATCH 3/4] thermal/drivers/tegra: fix set_trip_temp() deadlock Date: Wed, 14 Dec 2022 14:16:16 +0100 Message-Id: <20221214131617.2447-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221214131617.2447-1-johan+linaro@kernel.org> References: <20221214131617.2447-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752195795650658524?= X-GMAIL-MSGID: =?utf-8?q?1752195795650658524?= |
Series |
thermal: fix locking regressions in linux-next
|
|
Commit Message
Johan Hovold
Dec. 14, 2022, 1:16 p.m. UTC
The set_trip_temp() callback is used when changing the trip temperature
through sysfs. As it is called with the thermal-zone-device lock held
it must not use thermal_zone_get_trip() directly or it will deadlock.
Fixes: 56d7b397cc29 ("thermal/drivers/tegra: Use generic thermal_zone_get_trip() function")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/thermal/tegra/soctherm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 4203e74e2f79..220873298d77 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -594,7 +594,7 @@ static int tegra_thermctl_set_trip_temp(struct thermal_zone_device *tz, int trip if (!tz) return -EINVAL; - ret = thermal_zone_get_trip(tz, trip_id, &trip); + ret = __thermal_zone_get_trip(tz, trip_id, &trip); if (ret) return ret;