From 66ac2dc63510c11c149f1a4ba8ba1222df68355a Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 6 Aug 2021 14:43:39 +0200 Subject: [PATCH] gpu/intel: avoid one-by-off in ring buffer during wrap. issue #4254 --- repos/os/src/drivers/gpu/intel/ring_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/drivers/gpu/intel/ring_buffer.h b/repos/os/src/drivers/gpu/intel/ring_buffer.h index e835ad9425..5f9ffefeb5 100644 --- a/repos/os/src/drivers/gpu/intel/ring_buffer.h +++ b/repos/os/src/drivers/gpu/intel/ring_buffer.h @@ -112,7 +112,7 @@ class Igd::Ring_buffer _dwords[index] = cmd.value; _tail++; - if (_tail > _max) { + if (_tail >= _max) { Genode::warning("ring buffer wrapped ", "_tail: ", _tail, " ", "_max: ", _max); _tail = 0;