[PATCH 1/3] drm: kill BKL from common code
Andreas Schwab
schwab at linux-m68k.org
Tue Aug 24 11:46:40 PDT 2010
Arnd Bergmann <arnd at arndb.de> writes:
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 4a66201..76d98f4 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -506,9 +506,9 @@ long drm_ioctl(struct file *filp,
> if (ioctl->flags & DRM_UNLOCKED)
> retcode = func(dev, kdata, file_priv);
> else {
> - lock_kernel();
> + mutex_lock(&drm_global_mutex);
> retcode = func(dev, kdata, file_priv);
> - unlock_kernel();
> + mutex_unlock(&drm_global_mutex);
How is this supposed to work in the context of sleeping ioctls, like
drm_lock?
[drm:drm_ioctl], pid=2461, cmd=0x8008642a, nr=0x2a, dev 0xe200, auth=1
[drm:drm_lock], 1 (pid 2461) requests lock (0x80000003), flags = 0x00000000
[drm:drm_ioctl], pid=2520, cmd=0x8008642b, nr=0x2b, dev 0xe200, auth=1
# ps 2461 2520
PID TTY STAT TIME COMMAND
2461 tty7 Ss+ 0:01 /usr/bin/Xorg -br :0 vt7 -nolisten tcp -auth /var/lib
2520 pts/2 D+ 0:00 glxgears
Andreas.
--
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the dri-devel
mailing list