Commit 4472ab27 authored by Dave Airlie's avatar Dave Airlie Committed by Ben Hutchings

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

commit de47a9cd upstream.

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>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 122d1fd8
......@@ -59,8 +59,9 @@ static int radeon_atrm_call(acpi_handle atrm_handle, uint8_t *bios,
obj = (union acpi_object *)buffer.pointer;
memcpy(bios+offset, obj->buffer.pointer, obj->buffer.length);
len = obj->buffer.length;
kfree(buffer.pointer);
return obj->buffer.length;
return len;
}
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