From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] thermal/drivers/thermal_hwmon: Fix a kernel NULL pointer dereference
Date: Wed, 29 Mar 2023 20:39:04 +0200 [thread overview]
Message-ID: <29ae56fe-11ab-cb5b-9da7-f00bf8607634@linaro.org> (raw)
In-Reply-To: <12190090.O9o76ZdvQC@kreacher>
On 29/03/2023 19:43, Rafael J. Wysocki wrote:
[ ... ]
>>> What about the message printed when temp is NULL. Should the original
>>> form of it be restored too?
>>
>> Yes, you are right, for the sake of consistency we should restore also
>> this one.
>
> So I'm going to apply the appended patch.
>
> Please let me know if there are any concerns regarding it.
>
> ---
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Subject: [PATCH] thermal: thermal_hwmon: Revert recent message adjustment
>
> For the sake of consistency, revert the second part of the
> thermal_hwmon.c hunk from commit dec07d399cc8 ("thermal: Don't use
> 'device' internal thermal zone structure field") after the first
> part of it has been reverted.
>
> Link: https://lore.kernel.org/linux-pm/5b084360-898b-aad0-0b8e-33acc585d71d@linaro.org
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/thermal/thermal_hwmon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-pm/drivers/thermal/thermal_hwmon.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_hwmon.c
> +++ linux-pm/drivers/thermal/thermal_hwmon.c
> @@ -236,7 +236,7 @@ void thermal_remove_hwmon_sysfs(struct t
> temp = thermal_hwmon_lookup_temp(hwmon, tz);
> if (unlikely(!temp)) {
> /* Should never happen... */
> - dev_dbg(hwmon->device, "temperature input lookup failed!\n");
> + dev_dbg(&tz->device, "temperature input lookup failed!\n");
> return;
> }
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2023-03-29 18:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 9:00 [PATCH -next] thermal/drivers/thermal_hwmon: Fix a kernel NULL pointer dereference Zhang Rui
2023-03-29 9:57 ` Daniel Lezcano
2023-03-29 10:55 ` Rafael J. Wysocki
2023-03-29 11:24 ` Zhang, Rui
2023-03-29 12:01 ` Rafael J. Wysocki
2023-03-29 12:06 ` Rafael J. Wysocki
2023-03-29 12:33 ` Zhang, Rui
2023-03-29 13:50 ` Rafael J. Wysocki
2023-03-29 14:16 ` Daniel Lezcano
2023-03-29 14:38 ` Rafael J. Wysocki
2023-03-29 15:59 ` Daniel Lezcano
2023-03-29 16:03 ` Rafael J. Wysocki
2023-03-29 16:18 ` Daniel Lezcano
2023-03-29 17:43 ` Rafael J. Wysocki
2023-03-29 18:39 ` Daniel Lezcano [this message]
2023-03-29 16:00 ` Daniel Lezcano
2023-03-29 17:05 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29ae56fe-11ab-cb5b-9da7-f00bf8607634@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox