From: Dinh Nguyen <dinguyen@kernel.org>
To: Liwei Song <liwei.song@windriver.com>,
mahesh.rao@altera.com, matthew.gerlach@altera.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: stratix10-rsu: Fix NULL pointer dereference when RSU is disabled
Date: Wed, 11 Feb 2026 23:28:59 -0600 [thread overview]
Message-ID: <92fd8028-c145-4bcd-80b7-96de77f3adf0@kernel.org> (raw)
In-Reply-To: <20260212040035.3182294-1-liwei.song@windriver.com>
On 2/11/26 22:00, Liwei Song wrote:
> When the Remote System Update (RSU) isn't enabled in the First Stage
> Boot Loader (FSBL), the driver encounters a NULL pointer dereference when
> excute svc_normal_to_secure_thread() thread, resulting in a kernel panic:
>
> Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
> Mem abort info:
> ...
> Data abort info:
> ...
> [0000000000000008] user address but active_mm is swapper
> Internal error: Oops: 0000000096000004 [#1] SMP
> Modules linked in:
> CPU: 0 UID: 0 PID: 79 Comm: svc_smc_hvc_thr Not tainted 6.19.0-rc8-yocto-standard+ #59 PREEMPT
> Hardware name: SoCFPGA Stratix 10 SoCDK (DT)
> pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : svc_normal_to_secure_thread+0x38c/0x990
> lr : svc_normal_to_secure_thread+0x144/0x990
> ...
> Call trace:
> svc_normal_to_secure_thread+0x38c/0x990 (P)
> kthread+0x150/0x210
> ret_from_fork+0x10/0x20
> Code: 97cfc113 f9400260 aa1403e1 f9400400 (f9400402)
> ---[ end trace 0000000000000000 ]---
>
> The issue occurs because rsu_send_async_msg() fails when RSU is not enabled
> in firmware, causing the channel to be freed via stratix10_svc_free_channel().
> However, the probe function continues execution and registers
> svc_normal_to_secure_thread(), which subsequently attempts to access the
> already-freed channel, triggering the NULL pointer dereference.
>
> Fix this by properly cleaning up the async client and returning early on
> failure, preventing the thread from being used with an invalid channel.
>
> Fixes: 15847537b623 ("firmware: stratix10-rsu: Migrate RSU driver to use stratix10 asynchronous framework.")
> Signed-off-by: Liwei Song <liwei.song@windriver.com>
> ---
Applied!
Thanks,
Dinh
prev parent reply other threads:[~2026-02-12 5:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 4:00 Liwei Song
2026-02-12 5:28 ` Dinh Nguyen [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=92fd8028-c145-4bcd-80b7-96de77f3adf0@kernel.org \
--to=dinguyen@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei.song@windriver.com \
--cc=mahesh.rao@altera.com \
--cc=matthew.gerlach@altera.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
all inboxes | Powered by JetHome®