lkml.org 
[lkml]   [2013]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.10 138/173] drm/radeon/vm: dont attempt to update ptes if ib allocation fails
    Date
    3.10-stable review patch.  If anyone has any objections, please let me know.

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

    From: Alex Deucher <alexander.deucher@amd.com>

    commit 4cc948b94a222c310ae089c36718aac7a03aec90 upstream.

    If we fail to allocate an indirect buffer (ib) when updating
    the ptes, return an error instead of trying to use the ib.
    Avoids a null pointer dereference.

    Bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=58621

    v2 (chk): rebased on drm-fixes-3.12 for stable inclusion

    Reviewed-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/gpu/drm/radeon/radeon_gart.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/drivers/gpu/drm/radeon/radeon_gart.c
    +++ b/drivers/gpu/drm/radeon/radeon_gart.c
    @@ -1157,6 +1157,8 @@ int radeon_vm_bo_update_pte(struct radeo
    return -ENOMEM;

    r = radeon_ib_get(rdev, ridx, &ib, NULL, ndw * 4);
    + if (r)
    + return r;
    ib.length_dw = 0;

    r = radeon_vm_update_pdes(rdev, vm, &ib, bo_va->soffset, bo_va->eoffset);

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2013-12-03 00:21    [W:4.293 / U:0.660 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site