mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>,
	Zhang Rui <rui.zhang@intel.com>, Amit Kucheria <amitk@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Collins <quic_collinsd@quicinc.com>,
	Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>,
	Ram Chandrasekar <rkumbako@codeaurora.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] thermal: Fix a NULL pointer dereference
Date: Wed, 6 Oct 2021 11:39:57 +0200	[thread overview]
Message-ID: <ca7eb02d-2b21-9bc0-7abe-2a4e6ab0a07b@linaro.org> (raw)
In-Reply-To: <f869ea55-f071-f971-282e-31878a0f0b68@quicinc.com>

On 06/10/2021 00:09, Subbaraman Narayanamurthy wrote:

[ ... ]

>>> The tests can be replaced by (!data->ops), no ?
>> Thanks Daniel for reviewing the patch.
>>
>> I agree that even if a sensor module is unregistered, that would call
>> "thermal_zone_of_sensor_unregister" which would eventually set NULL on
>> get_temp() and get_trend() and "tzd->ops" as well.
>>
>> However, of_thermal_get_temp() is trying to call "data->ops->get_temp"
>> which comes from a sensor driver when it registers. There is no
>> guarantee that it would be non-NULL right?
>>
>> Thinking of which, I think having both checks would be valid.
> 
> Hi Daniel,
> Do you still have any concerns with this change?

Yes, let me answer to the initial patch.


-- 
<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

  reply	other threads:[~2021-10-06  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 19:01 Subbaraman Narayanamurthy
2021-09-17  9:31 ` Daniel Lezcano
2021-09-17 20:06   ` Subbaraman Narayanamurthy
2021-10-05 22:09     ` Subbaraman Narayanamurthy
2021-10-06  9:39       ` Daniel Lezcano [this message]
2021-10-06 11:08 ` Daniel Lezcano
2021-10-08 19:50   ` Subbaraman Narayanamurthy
2021-10-19  1:21     ` Subbaraman Narayanamurthy
2021-10-19  7:35       ` Daniel Lezcano
2021-10-21 18:29         ` Subbaraman Narayanamurthy

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=ca7eb02d-2b21-9bc0-7abe-2a4e6ab0a07b@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amitk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=manafm@codeaurora.org \
    --cc=quic_collinsd@quicinc.com \
    --cc=quic_subbaram@quicinc.com \
    --cc=rkumbako@codeaurora.org \
    --cc=rui.zhang@intel.com \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®