• Thomas Hellstrom's avatar
    drm: Fix an unwanted master inheritance v2 · c627716e
    Thomas Hellstrom authored
    commit a0af2e53 upstream.
    
    A client calling drmSetMaster() using a file descriptor that was opened
    when another client was master would inherit the latter client's master
    object and all its authenticated clients.
    
    This is unwanted behaviour, and when this happens, instead allocate a
    brand new master object for the client calling drmSetMaster().
    
    Fixes a BUG() throw in vmw_master_set().
    Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    [bwh: Backported to 3.2:
     - s/master_mutex/struct_mutex/
     - drm_new_set_master() must drop struct_mutex while calling
       drm_driver::master_create
     - Adjust filename, context, indentation]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    c627716e
drm_fops.c 17.4 KB