Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84f20113 authored by Markus Metzger's avatar Markus Metzger Committed by Ingo Molnar
Browse files

x86, ds: fix bounds check in ds selftest



Fix a bad bounds check in the debug store selftest.

Signed-off-by: default avatarMarkus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144558.450027000@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 353afeea
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -47,8 +47,13 @@ static int ds_selftest_bts_consistency(const struct bts_trace *trace)
		printk(KERN_CONT "bad bts buffer setup...");
		error = -1;
	}
	/*
	 * We allow top in [begin; end], since its not clear when the
	 * overflow adjustment happens: after the increment or before the
	 * write.
	 */
	if ((trace->ds.top < trace->ds.begin) ||
	    (trace->ds.end <= trace->ds.top)) {
	    (trace->ds.end < trace->ds.top)) {
		printk(KERN_CONT "bts top out of bounds...");
		error = -1;
	}