diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-07-11 18:56:00 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-07-11 18:56:00 +0000 |
| commit | 0020183b00a3f763e93c9f1b392ff0c7e3cece53 (patch) | |
| tree | 9abbc8d7d5af54cda079bcb50f003519c3fda720 /sys | |
| parent | aceb30220e8cbbc8e596b8530ca8ff839e7f3591 (diff) | |
i915: Defer destroying waitqueue until after callback is removed.
Candidate fix for PR kern/56561.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/external/bsd/drm2/dist/drm/i915/i915_request.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c index e5d1cee7680..6471120cb66 100644 --- a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c +++ b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c @@ -1,4 +1,4 @@ -/* $NetBSD: i915_request.c,v 1.16 2021/12/27 13:29:15 riastradh Exp $ */ +/* $NetBSD: i915_request.c,v 1.17 2022/07/11 18:56:00 riastradh Exp $ */ /* * Copyright © 2008-2015 Intel Corporation @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.16 2021/12/27 13:29:15 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.17 2022/07/11 18:56:00 riastradh Exp $"); #include <linux/dma-fence-array.h> #include <linux/irq_work.h> @@ -1630,7 +1630,6 @@ long i915_request_wait(struct i915_request *rq, timeout = -ETIME; } spin_unlock(rq->fence.lock); - DRM_DESTROY_WAITQUEUE(&wait.wq); #else for (;;) { set_current_state(state); @@ -1657,6 +1656,9 @@ long i915_request_wait(struct i915_request *rq, #endif dma_fence_remove_callback(&rq->fence, &wait.cb); +#ifdef __NetBSD__ + DRM_DESTROY_WAITQUEUE(&wait.wq); +#endif out: mutex_release(&rq->engine->gt->reset.mutex.dep_map, _THIS_IP_); |
