From: Mikulas Patocka Date: Wed, 29 Oct 2008 21:01:17 +0000 (-0700) Subject: framebuffer compat_ioctl deadlock X-Git-Tag: v2.6.28-rc3~54 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=120a37470c2831fea49fdebaceb5a7039f700ce6;p=linux-2.6-omap-h63xx.git framebuffer compat_ioctl deadlock Fix deadlock in fb_compat_ioctl. fb_compat_ioctl acquires a mutex and calls fb_ioctl that tries to acquire that mutex too. A regression added during BKL removal. Signed-off-by: Mikulas Patocka Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index cd5f20da738..6048b55f287 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1262,8 +1262,8 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case FBIOPUT_CON2FBMAP: arg = (unsigned long) compat_ptr(arg); case FBIOBLANK: - ret = fb_ioctl(file, cmd, arg); - break; + mutex_unlock(&info->lock); + return fb_ioctl(file, cmd, arg); case FBIOGET_FSCREENINFO: ret = fb_get_fscreeninfo(inode, file, cmd, arg);