Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/linux drm: Release fence if we're abou...



details:   https://anonhg.NetBSD.org/src/rev/1c4f6febf106
branches:  trunk
changeset: 984973:1c4f6febf106
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 02 20:20:54 2021 +0000

description:
drm: Release fence if we're about to return too.

Should fix another fence leak.

XXX pullup-9

diffstat:

 sys/external/bsd/drm2/linux/linux_reservation.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r af1d277930ba -r 1c4f6febf106 sys/external/bsd/drm2/linux/linux_reservation.c
--- a/sys/external/bsd/drm2/linux/linux_reservation.c   Mon Aug 02 17:45:10 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_reservation.c   Mon Aug 02 20:20:54 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_reservation.c,v 1.12 2021/06/27 08:10:36 riastradh Exp $ */
+/*     $NetBSD: linux_reservation.c,v 1.13 2021/08/02 20:20:54 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_reservation.c,v 1.12 2021/06/27 08:10:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_reservation.c,v 1.13 2021/08/02 20:20:54 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -794,9 +794,9 @@
        KASSERT(fence != NULL);
        rcu_read_unlock();
        ret = fence_wait_timeout(fence, intr, timeout);
+       fence_put(fence);
        if (ret <= 0)
                return ret;
-       fence_put(fence);
        KASSERT(ret <= timeout);
        timeout = ret;
        goto top;



Home | Main Index | Thread Index | Old Index