summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-09-12 19:33:55 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-09-14 20:06:15 +0200
commit2b30842e52d9a364428b598f5edd4b12fa772f5a (patch)
tree16674ba831c7ec8560ac020516c7cab9e39bbbe9 /tools/perf/scripts/python/bin
parent7c0940e431c33ca13e9fde57ea0ad56da6529c56 (diff)
ACPI: SBS: Fix NULL pointer dereference on allocation failure
acpi_sbs_probe() jumps to the common error path when kzalloc_obj() fails, but platform_set_drvdata() is only called after the allocation succeeds. The error path calls acpi_sbs_remove(), which retrieves the unset driver data and dereferences the resulting NULL pointer when locking sbs->lock, causing a NULL pointer dereference. Return -ENOMEM directly when the allocation fails, since no resources have been initialized at that point and there is nothing to clean up. This issue was found by manual code inspection. Fixes: 9460eaae2ee42 ("ACPI: SBS: Convert the driver to a platform one") Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Link: https://patch.msgid.link/20260912113355.644238-1-lgs201920130244@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions