Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/i915: Fix use-before-null-check in i915_irq_emit().
drm: Avoid client deadlocks when the master disappears.
drm: Wake up all lock waiters when the master disappears.
drm: Don't return ERESTARTSYS to user-space.

+20 -12
+1 -1
drivers/gpu/drm/drm_bufs.c
··· 420 420 dev->sigdata.lock = NULL; 421 421 master->lock.hw_lock = NULL; /* SHM removed */ 422 422 master->lock.file_priv = NULL; 423 - wake_up_interruptible(&master->lock.lock_queue); 423 + wake_up_interruptible_all(&master->lock.lock_queue); 424 424 } 425 425 break; 426 426 case _DRM_AGP:
+14
drivers/gpu/drm/drm_fops.c
··· 484 484 mutex_lock(&dev->struct_mutex); 485 485 486 486 if (file_priv->is_master) { 487 + struct drm_master *master = file_priv->master; 487 488 struct drm_file *temp; 488 489 list_for_each_entry(temp, &dev->filelist, lhead) { 489 490 if ((temp->master == file_priv->master) && 490 491 (temp != file_priv)) 491 492 temp->authenticated = 0; 493 + } 494 + 495 + /** 496 + * Since the master is disappearing, so is the 497 + * possibility to lock. 498 + */ 499 + 500 + if (master->lock.hw_lock) { 501 + if (dev->sigdata.lock == master->lock.hw_lock) 502 + dev->sigdata.lock = NULL; 503 + master->lock.hw_lock = NULL; 504 + master->lock.file_priv = NULL; 505 + wake_up_interruptible_all(&master->lock.lock_queue); 492 506 } 493 507 494 508 if (file_priv->minor->master == file_priv->master) {
+2 -1
drivers/gpu/drm/drm_lock.c
··· 80 80 __set_current_state(TASK_INTERRUPTIBLE); 81 81 if (!master->lock.hw_lock) { 82 82 /* Device has been unregistered */ 83 + send_sig(SIGTERM, current, 0); 83 84 ret = -EINTR; 84 85 break; 85 86 } ··· 94 93 /* Contention */ 95 94 schedule(); 96 95 if (signal_pending(current)) { 97 - ret = -ERESTARTSYS; 96 + ret = -EINTR; 98 97 break; 99 98 } 100 99 }
-8
drivers/gpu/drm/drm_stub.c
··· 146 146 147 147 drm_ht_remove(&master->magiclist); 148 148 149 - if (master->lock.hw_lock) { 150 - if (dev->sigdata.lock == master->lock.hw_lock) 151 - dev->sigdata.lock = NULL; 152 - master->lock.hw_lock = NULL; 153 - master->lock.file_priv = NULL; 154 - wake_up_interruptible(&master->lock.lock_queue); 155 - } 156 - 157 149 drm_free(master, sizeof(*master), DRM_MEM_DRIVER); 158 150 } 159 151
+3 -2
drivers/gpu/drm/i915/i915_irq.c
··· 383 383 drm_i915_irq_emit_t *emit = data; 384 384 int result; 385 385 386 - RING_LOCK_TEST_WITH_RETURN(dev, file_priv); 387 - 388 386 if (!dev_priv) { 389 387 DRM_ERROR("called with no initialization\n"); 390 388 return -EINVAL; 391 389 } 390 + 391 + RING_LOCK_TEST_WITH_RETURN(dev, file_priv); 392 + 392 393 mutex_lock(&dev->struct_mutex); 393 394 result = i915_emit_irq(dev); 394 395 mutex_unlock(&dev->struct_mutex);