Module Name: src Committed By: riastradh Date: Sun Dec 19 12:09:51 UTC 2021
Modified Files: src/sys/external/bsd/drm2/linux: linux_dma_fence.c Log Message: drm: Add a kassert for fence destruction. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/linux/linux_dma_fence.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/linux/linux_dma_fence.c diff -u src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.22 src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.23 --- src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.22 Sun Dec 19 12:09:27 2021 +++ src/sys/external/bsd/drm2/linux/linux_dma_fence.c Sun Dec 19 12:09:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_dma_fence.c,v 1.22 2021/12/19 12:09:27 riastradh Exp $ */ +/* $NetBSD: linux_dma_fence.c,v 1.23 2021/12/19 12:09:51 riastradh Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.22 2021/12/19 12:09:27 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.23 2021/12/19 12:09:51 riastradh Exp $"); #include <sys/atomic.h> #include <sys/condvar.h> @@ -306,6 +306,8 @@ dma_fence_release(struct kref *refcount) struct dma_fence *fence = container_of(refcount, struct dma_fence, refcount); + KASSERTMSG(TAILQ_EMPTY(&fence->f_callbacks), + "fence %p has pending callbacks", fence); KASSERT(!dma_fence_referenced_p(fence)); if (fence->ops->release)