All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/vmwgfx: Propagate error on failed ioctl
@ 2022-03-13  5:06 Philipp Sieweck
  2022-03-25 15:07 ` Javier Martinez Canillas
  2022-03-25 19:28 ` Zack Rusin
  0 siblings, 2 replies; 4+ messages in thread
From: Philipp Sieweck @ 2022-03-13  5:06 UTC (permalink / raw)
  To: linux-graphics-maintainer, zackr, dri-devel; +Cc: Philipp Sieweck

The cases of vmw_user_bo_synccpu_grab failing with -ERESTARTSYS or -EBUSY
are handled in vmw_user_bo_synccpu_ioctl by not printing an error message.
However, the error value gets discarded, indicating success. This leads
to rendering glitches and a reported drm error on the next ioctl call to
release the handle.

This patch propagates the error value from vmw_user_synccpu_grab.

Signed-off-by: Philipp Sieweck <psi@informatik.uni-kiel.de>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
index 31aecc46624b..81fe4dc5e6ab 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
@@ -621,6 +621,8 @@ int vmw_user_bo_synccpu_ioctl(struct drm_device *dev, void *data,
 				  (unsigned int) arg->handle);
 			return ret;
 		}
+		if (unlikely(ret != 0))
+			return ret;
 		break;
 	case drm_vmw_synccpu_release:
 		ret = vmw_user_bo_synccpu_release(file_priv,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-28 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-13  5:06 [PATCH] drm/vmwgfx: Propagate error on failed ioctl Philipp Sieweck
2022-03-25 15:07 ` Javier Martinez Canillas
2022-03-25 19:28 ` Zack Rusin
2022-03-28 16:36   ` Philipp Sieweck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.