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/gt i915: Assert output s...



details:   https://anonhg.NetBSD.org/src/rev/88eab64adcf7
branches:  trunk
changeset: 1028959:88eab64adcf7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:35:04 2021 +0000

description:
i915: Assert output segment index.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r b1ef1fe57d7b -r 88eab64adcf7 sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c       Sun Dec 19 12:34:58 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c       Sun Dec 19 12:35:04 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_ggtt.c,v 1.13 2021/12/19 12:34:50 riastradh Exp $        */
+/*     $NetBSD: intel_ggtt.c,v 1.14 2021/12/19 12:35:04 riastradh Exp $        */
 
 // SPDX-License-Identifier: MIT
 /*
@@ -6,7 +6,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.13 2021/12/19 12:34:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.14 2021/12/19 12:35:04 riastradh Exp $");
 
 #include <linux/stop_machine.h>
 
@@ -1670,6 +1670,7 @@
                                continue;
                        }
                        for (k = 0; k < iseg->ds_len >> PAGE_SHIFT; k++) {
+                               KASSERT(i < view->partial.size);
                                bus_dma_segment_t *oseg =
                                    &st->sgl->sg_dmamap->dm_segs[i++];
                                oseg->ds_addr = iseg->ds_addr + offset +



Home | Main Index | Thread Index | Old Index