diff options
author | Dave Airlie <airlied@redhat.com> | 2012-02-02 15:25:16 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-02 15:25:16 +0000 |
commit | de47a9cd62771e3e78954d855d2304fbad4c5a44 (patch) | |
tree | 8fab7f0f5742ebd75eba4d333def8dbaaff01b95 /drivers | |
parent | 3f7e363249ad5f4070025f6c09fd264f93f24eab (diff) | |
download | linux-de47a9cd62771e3e78954d855d2304fbad4c5a44.tar.gz linux-de47a9cd62771e3e78954d855d2304fbad4c5a44.tar.bz2 linux-de47a9cd62771e3e78954d855d2304fbad4c5a44.zip |
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: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atpx_handler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 13ac63ba6075..98724fcb0088 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c @@ -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) |