]> git.hungrycats.org Git - linux/commitdiff
drm/vmwgfx: Fix error printout on signals pending
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 25 Nov 2014 07:20:05 +0000 (08:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 16:29:34 +0000 (08:29 -0800)
commit e338c4c2b620ba4e75fd3576f8142eb93be12ce3 upstream.

The function vmw_master_check() might return -ERESTARTSYS if there is a
signal pending, indicating that the IOCTL should be rerun, potentially from
user-space. At that point we shouldn't print out an error message since that
is not an error condition. In short, avoid bloating the kernel log when a
process refuses to die on SIGTERM.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

index 25f3c250fd98635ff50a7249f40e691686519674..daeca571b42f8e7c26e5ab523e7bdd3e43fd39e4 100644 (file)
@@ -1063,8 +1063,12 @@ static long vmw_generic_ioctl(struct file *filp, unsigned int cmd,
 
        vmaster = vmw_master_check(dev, file_priv, flags);
        if (unlikely(IS_ERR(vmaster))) {
-               DRM_INFO("IOCTL ERROR %d\n", nr);
-               return PTR_ERR(vmaster);
+               ret = PTR_ERR(vmaster);
+
+               if (ret != -ERESTARTSYS)
+                       DRM_INFO("IOCTL ERROR Command %d, Error %ld.\n",
+                                nr, ret);
+               return ret;
        }
 
        ret = ioctl_func(filp, cmd, arg);