summaryrefslogtreecommitdiff
path: root/include/linux/vmalloc.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2026-03-12 16:18:14 +0100
committerMark Brown <broonie@kernel.org>2026-03-16 18:36:03 +0000
commitdee0774bbb2abb172e9069ce5ffef579b12b3ae9 (patch)
treec3335ab5ea51b8a1e7a13f9800252a09d03ba7a8 /include/linux/vmalloc.h
parent8634e05b08ead636e926022f4a98416e13440df9 (diff)
spi: fix statistics allocation
The controller per-cpu statistics is not allocated until after the controller has been registered with driver core, which leaves a window where accessing the sysfs attributes can trigger a NULL-pointer dereference. Fix this by moving the statistics allocation to controller allocation while tying its lifetime to that of the controller (rather than using implicit devres). Fixes: 6598b91b5ac3 ("spi: spi.c: Convert statistics to per-cpu u64_stats_t") Cc: stable@vger.kernel.org # 6.0 Cc: David Jander <david@protonic.nl> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260312151817.32100-3-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/vmalloc.h')
0 files changed, 0 insertions, 0 deletions