drm: pick correct master for cleaning up
When a master is exiting, make sure we clean it up and not the currently in charge master.main
parent
d1513528d7
commit
e6be93b2a6
|
@ -488,13 +488,15 @@ int drm_release(struct inode *inode, struct file *filp)
|
||||||
if (drm_core_check_feature(dev, DRIVER_MODESET))
|
if (drm_core_check_feature(dev, DRIVER_MODESET))
|
||||||
drm_fb_release(filp);
|
drm_fb_release(filp);
|
||||||
|
|
||||||
file_priv->master = NULL;
|
|
||||||
|
|
||||||
if (file_priv->is_master) {
|
if (file_priv->is_master) {
|
||||||
drm_put_master(file_priv->minor->master);
|
if (file_priv->minor->master == file_priv->master)
|
||||||
file_priv->minor->master = NULL;
|
file_priv->minor->master = NULL;
|
||||||
|
drm_put_master(file_priv->master);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file_priv->master = NULL;
|
||||||
|
file_priv->is_master = 0;
|
||||||
|
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
drm_object_release(filp);
|
drm_object_release(filp);
|
||||||
if (file_priv->remove_auth_on_close == 1) {
|
if (file_priv->remove_auth_on_close == 1) {
|
||||||
|
|
Loading…
Reference in New Issue