lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.16 152/357] iommu/vt-d: Check return value of acpi_bus_get_device()
    Date
    3.16-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Joerg Roedel <jroedel@suse.de>

    commit c0df975f9045d6b2b13d88746e628ac308ff49ea upstream.

    Checking adev == NULL is not sufficient as
    acpi_bus_get_device() might not touch the value of this
    parameter in an error case, so check the return value
    directly.

    Fixes: ed40356b5fcf1ce28e026ab39c5b2b6939068b50
    Cc: David Woodhouse <dwmw2@infradead.org>
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/iommu/dmar.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    --- a/drivers/iommu/dmar.c
    +++ b/drivers/iommu/dmar.c
    @@ -677,8 +677,7 @@ static int __init dmar_acpi_dev_scope_in
    andd->object_name);
    continue;
    }
    - acpi_bus_get_device(h, &adev);
    - if (!adev) {
    + if (acpi_bus_get_device(h, &adev)) {
    pr_err("Failed to get device for ACPI object %s\n",
    andd->object_name);
    continue;



    \
     
     \ /
      Last update: 2014-10-04 03:21    [W:3.367 / U:0.372 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site