diff options
| author | 2026-01-08 20:42:54 +0530 | |
|---|---|---|
| committer | 2026-01-11 13:55:33 +0100 | |
| commit | efcffd9a6ad8d190651498d5eda53bfc7cf683a7 (patch) | |
| tree | f40fc6513e8d7922d29dcc51a3390e6ed2c63568 /scripts/Makefile.thinlto | |
| parent | staging: rtl8723bs: fix spacing around arithmetic operators (diff) | |
staging: greybus: lights: avoid NULL deref
gb_lights_light_config() stores channel_count before allocating the
channels array. If kcalloc() fails, gb_lights_release() iterates the
non-zero count and dereferences light->channels, which is NULL.
Allocate channels first and only then publish channels_count so the
cleanup path can't walk a NULL pointer.
Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
Link: https://lore.kernel.org/all/20260108103700.15384-1-chaitanyamishra.ai@gmail.com/
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Chaitanya Mishra <chaitanyamishra.ai@gmail.com>
Link: https://patch.msgid.link/20260108151254.81553-1-chaitanyamishra.ai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
