All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/syncobj: reset file ptr to NULL when released.
@ 2017-12-19 11:30 Dave Airlie
  2017-12-19 12:03 ` Chris Wilson
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Dave Airlie @ 2017-12-19 11:30 UTC (permalink / raw)
  To: dri-devel

From: Dave Airlie <airlied@redhat.com>

The vk cts test:
dEQP-VK.api.external.semaphore.opaque_fd.export_multiple_times_temporary

triggers a lot of
VFS: Close: file count is 0

This patch fixes it, but I'm guessing it's racy and someone will
smell rcu, but I just wanted to send out the proof of fixing it
so I remember.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_syncobj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index f776fc1cc543..ffa5bbd75852 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -361,6 +361,7 @@ static int drm_syncobj_file_release(struct inode *inode, struct file *file)
 {
 	struct drm_syncobj *syncobj = file->private_data;
 
+	syncobj->file = NULL;
 	drm_syncobj_put(syncobj);
 	return 0;
 }
-- 
2.14.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2017-12-22  9:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-19 11:30 [PATCH] drm/syncobj: reset file ptr to NULL when released Dave Airlie
2017-12-19 12:03 ` Chris Wilson
2017-12-19 12:05 ` Daniel Vetter
2017-12-19 12:07 ` [PATCH] drm/syncobj: Stop reusing the same struct file for all syncobj -> fd Chris Wilson
2017-12-19 12:28   ` Daniel Vetter
2017-12-21  2:42   ` Dave Airlie
2017-12-21  7:51     ` [Intel-gfx] " Chris Wilson
2017-12-21  9:28   ` [PATCH v2] " Chris Wilson
2017-12-21 10:50     ` Chris Wilson
2017-12-22  3:05     ` Dave Airlie
2017-12-22  9:28       ` Chris Wilson
2017-12-19 13:34 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-19 16:02 ` ✓ Fi.CI.IGT: " Patchwork
2017-12-21 10:13 ` ✓ Fi.CI.BAT: success for drm/syncobj: Stop reusing the same struct file for all syncobj -> fd (rev2) Patchwork
2017-12-21 12:06 ` ✗ Fi.CI.IGT: warning " Patchwork

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.