aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
diff options
context:
space:
mode:
authorDinghao Liu <[email protected]>2023-09-25 08:08:44 +0000
committerRafael J. Wysocki <[email protected]>2023-09-25 09:53:40 +0000
commitf4dcf06bc6e0161920b700ba3966411d716a321b (patch)
treee400fa83eb6831cdc763de6c41a942afb3d4547c /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
parentLinux 6.6-rc3 (diff)
downloadkernel-f4dcf06bc6e0161920b700ba3966411d716a321b.tar.gz
kernel-f4dcf06bc6e0161920b700ba3966411d716a321b.zip
ACPI: video: Fix NULL pointer dereference in acpi_video_bus_add()
acpi_video_bus_add_notify_handler() could free video->input and set it to NULL on failure, but this failure would be missed in its caller acpi_video_bus_add(). As a result, when an error happens in acpi_dev_install_notify_handler(), acpi_video_bus_add() would call acpi_video_bus_remove_notify_handler(), where a potential NULL pointer video->input is dereferenced in input_unregister_device(). Fix this by adding a return value check and adjusting the following error handling code. Fixes: 6f7016819766 ("ACPI: video: Install Notify() handler directly") Signed-off-by: Dinghao Liu <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions