• Daniel Vetter's avatar
    drm: safely free connectors from connector_iter · a703c550
    Daniel Vetter authored
    In
    
    commit 613051da
    
    
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Wed Dec 14 00:08:06 2016 +0100
    
        drm: locking&new iterators for connector_list
    
    we've went to extreme lengths to make sure connector iterations works
    in any context, without introducing any additional locking context.
    This worked, except for a small fumble in the implementation:
    
    When we actually race with a concurrent connector unplug event, and
    our temporary connector reference turns out to be the final one, then
    everything breaks: We call the connector release function from
    whatever context we happen to be in, which can be an irq/atomic
    context. And connector freeing grabs all kinds of locks and stuff.
    
    Fix this by creating a specially safe put function for connetor_iter,
    which (in this rare case) punts the cleanup to a worker.
    Reported-by: default avatarBen Widawsky <ben@bwidawsk.net>
    Cc: Ben Widawsky <ben@bwidawsk.net>
    Fixes: 613051da ("drm: locking&new ...
    a703c550
drm_connector.c 48.1 KB