summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorPrasanna Kumar T S M <ptsm@linux.microsoft.com>2026-03-20 09:03:06 +0300
committerMichal Simek <michal.simek@amd.com>2026-04-30 13:50:04 +0300
commitfb445935338405110baca8f541a2df3b4cb8d712 (patch)
tree6cfa79dd1e66e8679b6f6fb2258e6795c35ed3d2 /include/linux/debugobjects.h
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
downloadlinux-fb445935338405110baca8f541a2df3b4cb8d712.tar.xz
soc: xilinx: Fix race condition in event registration
The zynqmp_power driver registers handlers for suspend and subsystem restart events using register_event(). However, the work structures (zynqmp_pm_init_suspend_work and zynqmp_pm_init_restart_work) used by these handlers were allocated and initialized after the registration call. This created a race window where, if the firmware triggered an event immediately after registration but before allocation, the callback (suspend_event_callback or subsystem_restart_event_callback) would dereference a NULL pointer in work_pending(), leading to a crash. Fix this by allocating and initializing the work structures before registering the events. Fixes: fcf544ac6439 ("soc: xilinx: Add cb event for subsystem restart") Signed-off-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20260320060306.1540928-1-ptsm@linux.microsoft.com
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions