]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
accel/amdxdna: Check init_srcu_struct() return value
authorLizhi Hou <lizhi.hou@amd.com>
Tue, 7 Jul 2026 17:23:23 +0000 (10:23 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Wed, 8 Jul 2026 03:49:19 +0000 (20:49 -0700)
commit44d8fddf1c87d6bb6b65983041a0ce6c2af66bb9
treee549de0375fc4c44e2c6b0fb42d863cc800fc773
parent0f092793a7b527dfb2cde323d4e5630d43447b84
accel/amdxdna: Check init_srcu_struct() return value

The return value of init_srcu_struct() is currently ignored. If
initialization fails, subsequent use of hwctx_srcu may result in invalid
memory accesses.

Check the return value of init_srcu_struct() and propagate the error to
the caller.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260707172323.539721-1-lizhi.hou@amd.com
drivers/accel/amdxdna/amdxdna_pci_drv.c