提交 3e5fc80a 编写于 作者: D Dave Airlie

drm: don't set the signal blocker on the master process.

There is a problem with debugging the X server and gdb crashes in
the xkb startup code.

This avoids the problem by allowing the master process to get signals.
It should be safe as the signal blocker is mainly so that you can
Ctrl-Z a 3D application without locking up the whole box. Ctrl-Z the
X server isn't something many people do.
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 e5b4f194
...@@ -105,14 +105,19 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) ...@@ -105,14 +105,19 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
ret ? "interrupted" : "has lock"); ret ? "interrupted" : "has lock");
if (ret) return ret; if (ret) return ret;
sigemptyset(&dev->sigmask); /* don't set the block all signals on the master process for now
sigaddset(&dev->sigmask, SIGSTOP); * really probably not the correct answer but lets us debug xkb
sigaddset(&dev->sigmask, SIGTSTP); * xserver for now */
sigaddset(&dev->sigmask, SIGTTIN); if (!file_priv->master) {
sigaddset(&dev->sigmask, SIGTTOU); sigemptyset(&dev->sigmask);
dev->sigdata.context = lock->context; sigaddset(&dev->sigmask, SIGSTOP);
dev->sigdata.lock = dev->lock.hw_lock; sigaddset(&dev->sigmask, SIGTSTP);
block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask); sigaddset(&dev->sigmask, SIGTTIN);
sigaddset(&dev->sigmask, SIGTTOU);
dev->sigdata.context = lock->context;
dev->sigdata.lock = dev->lock.hw_lock;
block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask);
}
if (dev->driver->dma_ready && (lock->flags & _DRM_LOCK_READY)) if (dev->driver->dma_ready && (lock->flags & _DRM_LOCK_READY))
dev->driver->dma_ready(dev); dev->driver->dma_ready(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册