Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 12:09:35 UTC 2021

Modified Files:
        src/sys/external/bsd/drm2/linux: linux_dma_resv.c

Log Message:
drm: Paranoia: null out fence if unreferenceable.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/linux/linux_dma_resv.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_resv.c
diff -u src/sys/external/bsd/drm2/linux/linux_dma_resv.c:1.7 src/sys/external/bsd/drm2/linux/linux_dma_resv.c:1.8
--- src/sys/external/bsd/drm2/linux/linux_dma_resv.c:1.7	Sun Dec 19 11:54:39 2021
+++ src/sys/external/bsd/drm2/linux/linux_dma_resv.c	Sun Dec 19 12:09:35 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_dma_resv.c,v 1.7 2021/12/19 11:54:39 riastradh Exp $	*/
+/*	$NetBSD: linux_dma_resv.c,v 1.8 2021/12/19 12:09:35 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_resv.c,v 1.7 2021/12/19 11:54:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_resv.c,v 1.8 2021/12/19 12:09:35 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -708,7 +708,7 @@ top:
 	 * one.  If we can't, start over.
 	 */
 	if (fence) {
-		if (dma_fence_get_rcu(fence) == NULL)
+		if ((fence = dma_fence_get_rcu(fence)) == NULL)
 			goto restart;
 	}
 

Reply via email to