From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Konrad Dybcio <konradybcio@kernel.org>
Cc: Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
Raanan Avargil <raanan.avargil@intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH] thunderbolt: nhi: Don't act on random stack values
Date: Mon, 9 Mar 2026 12:39:52 +0100 [thread overview]
Message-ID: <20260309113952.GL2275908@black.igk.intel.com> (raw)
In-Reply-To: <20260309-topic-tbt_fixup-v1-1-c600d59f75a2@oss.qualcomm.com>
On Mon, Mar 09, 2026 at 10:39:49AM +0100, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> device_property_read_foo() returns 0 on success and only then modifies
> 'val'. Currently, val is left uninitialized if the aforementioned
> function returns non-zero, making nhi_wake_supported() return true
> almost always (random != 0) if the property is not present in device
> firmware.
>
> Invert the check to make it make sense.
Good catch!
> Note device_property_read_bool() would not be fitting here, as both
> 0 and (presumably) 1 seem to be acceptable values if the property is
> present at all.
I think all the systems out there just have this 1 which is why it has been
"working" so far.
> Fixes: 3cdb9446a117 ("thunderbolt: Add support for Intel Ice Lake")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Marked for stable and applied to thunderbolt.git/fixes, thanks!
prev parent reply other threads:[~2026-03-09 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 9:39 [PATCH] thunderbolt: nhi: Don't act on random stack values Konrad Dybcio
2026-03-09 11:39 ` Mika Westerberg [this message]
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=20260309113952.GL2275908@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=raanan.avargil@intel.com \
--cc=westeri@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