Commit de47a9cd authored by Dave Airlie's avatar Dave Airlie

drm/radeon: fix use after free in ATRM bios reading code.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=45503

Reported-and-Debugged-by: mlambda@gmail.com
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 3f7e3632
...@@ -59,8 +59,9 @@ static int radeon_atrm_call(acpi_handle atrm_handle, uint8_t *bios, ...@@ -59,8 +59,9 @@ static int radeon_atrm_call(acpi_handle atrm_handle, uint8_t *bios,
obj = (union acpi_object *)buffer.pointer; obj = (union acpi_object *)buffer.pointer;
memcpy(bios+offset, obj->buffer.pointer, obj->buffer.length); memcpy(bios+offset, obj->buffer.pointer, obj->buffer.length);
len = obj->buffer.length;
kfree(buffer.pointer); kfree(buffer.pointer);
return obj->buffer.length; return len;
} }
bool radeon_atrm_supported(struct pci_dev *pdev) bool radeon_atrm_supported(struct pci_dev *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment