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/gem i915: Avoid derefere...



details:   https://anonhg.NetBSD.org/src/rev/c22183b553b4
branches:  trunk
changeset: 374778:c22183b553b4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri May 12 10:13:37 2023 +0000

description:
i915: Avoid dereferencing null fence if resv has changed.

PR kern/57402

XXX pullup-10

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_busy.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 466b15de4ded -r c22183b553b4 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_busy.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_busy.c   Fri May 12 08:40:54 2023 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_busy.c   Fri May 12 10:13:37 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_busy.c,v 1.3 2021/12/19 11:20:25 riastradh Exp $      */
+/*     $NetBSD: i915_gem_busy.c,v 1.4 2023/05/12 10:13:37 riastradh Exp $      */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_busy.c,v 1.3 2021/12/19 11:20:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_busy.c,v 1.4 2023/05/12 10:13:37 riastradh Exp $");
 
 #include "gt/intel_engine.h"
 
@@ -130,6 +130,8 @@ retry:
                        struct dma_fence *fence =
                                rcu_dereference(list->shared[i]);
 
+                       if (read_seqcount_retry(&obj->base.resv->seq, seq))
+                               goto retry;
                        args->busy |= busy_check_reader(fence);
                }
        }



Home | Main Index | Thread Index | Old Index