From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Wang Jun <1742789905@qq.com>
Cc: "Benson Leung" <bleung@chromium.org>,
"Łukasz Bartosik" <ukaszb@chromium.org>,
"Andrei Kuchynski" <akuchynski@chromium.org>,
"Jameson Thies" <jthies@google.com>,
chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
gszhai@bjtu.edu.cn, 25125332@bjtu.edu.cn, 25125283@bjtu.edu.cn,
23120469@bjtu.edu.cn, stable@vger.kernel.org
Subject: Re: [PATCH] platform/chrome: cros_usbpd_notify: Add NULL pointer check for ACPI companion
Date: Thu, 2 Apr 2026 02:31:00 +0000 [thread overview]
Message-ID: <ac3U5Kn6jap5RtWU@google.com> (raw)
In-Reply-To: <tencent_B1B3C1F57C046AEC80A8218FE8AC43FD590A@qq.com>
On Tue, Mar 31, 2026 at 09:10:44AM +0800, Wang Jun wrote:
> In cros_usbpd_notify_remove_acpi(), ACPI_COMPANION() may return NULL
> in certain scenarios. Directly dereferencing adev->handle without
> checking could lead to a kernel oops.
>
> Add a NULL check and emit a warning when no ACPI companion is found,
> then skip the notify handler removal to ensure safety.
>
> Cc: stable@vger.kernel.org
> Fixes: 7e91e1ac60bb ("platform/chrome: cros_usbpd_notify: Amend ACPI driver to plat")
> Signed-off-by: Wang Jun <1742789905@qq.com>
The patch makes less sense to me. The device is matching and binding via
ACPI. The companion device should be there.
prev parent reply other threads:[~2026-04-02 2:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 1:10 [PATCH] platform/chrome: cros_usbpd_notify: Add NULL pointer check for ACPI companion Wang Jun
2026-04-02 2:31 ` Tzung-Bi Shih [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=ac3U5Kn6jap5RtWU@google.com \
--to=tzungbi@kernel.org \
--cc=1742789905@qq.com \
--cc=23120469@bjtu.edu.cn \
--cc=25125283@bjtu.edu.cn \
--cc=25125332@bjtu.edu.cn \
--cc=akuchynski@chromium.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=gszhai@bjtu.edu.cn \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=ukaszb@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.