• T
    drm/vmwgfx: Fix a destoy-while-held mutex problem. · 73a88250
    Thomas Hellstrom 提交于
    When validating legacy surfaces, the backup bo might be destroyed at
    surface validate time. However, the kms resource validation code may have
    the bo reserved, so we will destroy a locked mutex. While there shouldn't
    be any other users of that mutex when it is destroyed, it causes a lock
    leak and thus throws a lockdep error.
    
    Fix this by having the kms resource validation code hold a reference to
    the bo while we have it reserved. We do this by introducing a validation
    context which might come in handy when the kms code is extended to validate
    multiple resources or buffers.
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: NBrian Paul <brianp@vmware.com>
    Reviewed-by: NSinclair Yeh <syeh@vmware.com>
    73a88250
vmwgfx_kms.c 74.7 KB