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/dist/drm/i915 uvm_map consumes referen...



details:   https://anonhg.NetBSD.org/src/rev/f493007ae4bc
branches:  trunk
changeset: 993001:f493007ae4bc
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:44:04 2018 +0000

description:
uvm_map consumes reference on success, so be sure to acquire another.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c       |  7 +++++--
 sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c |  6 ++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r 47f82937bea4 -r f493007ae4bc sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c     Mon Aug 27 14:43:48 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c     Mon Aug 27 14:44:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_cmd_parser.c,v 1.9 2018/08/27 14:43:48 riastradh Exp $    */
+/*     $NetBSD: i915_cmd_parser.c,v 1.10 2018/08/27 14:44:04 riastradh Exp $   */
 
 /*
  * Copyright © 2013 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.9 2018/08/27 14:43:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.10 2018/08/27 14:44:04 riastradh Exp $");
 
 #include "i915_drv.h"
 
@@ -873,6 +873,9 @@
        if (error)
                return NULL;
 
+       /* uvm_map consumes a reference on success.  */
+       uao_reference(obj->base.filp);
+
        return (void *)va;
 #else
        int i;
diff -r 47f82937bea4 -r f493007ae4bc sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c       Mon Aug 27 14:43:48 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c       Mon Aug 27 14:44:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_render_state.c,v 1.7 2018/08/27 13:43:22 riastradh Exp $      */
+/*     $NetBSD: i915_gem_render_state.c,v 1.8 2018/08/27 14:44:04 riastradh Exp $      */
 
 /*
  * Copyright © 2014 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_render_state.c,v 1.7 2018/08/27 13:43:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_render_state.c,v 1.8 2018/08/27 14:44:04 riastradh Exp $");
 
 #include "i915_drv.h"
 #include "intel_renderstate.h"
@@ -121,6 +121,8 @@
                UVM_ADV_NORMAL, 0));
        if (ret)
                return ret;
+       /* uvm_map consumes a reference on success.  */
+       uao_reference(so->obj->base.filp);
        d = (void *)kva;
 #else
        page = sg_page(so->obj->pages->sgl);



Home | Main Index | Thread Index | Old Index