console: avoid wrapping of console pointers
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Feb 2017 14:59:15 +0000 (15:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Feb 2017 14:59:15 +0000 (15:59 +0100)
commit29c249edee121ffc8446cbd7e7d3cde0610a10e6
treef10cdb68dacaff63dab16c028e82ce1af9033196
parentfe416bf9957669e34e93a614970546b3a002f0e8
console: avoid wrapping of console pointers

We particularly want/need to avoid accessing data outside (ahead of)
the ring buffer. Also latch both pointers into local variable to
avoid different steps of the calculation being done with different
values.

Reported-by: Quan Luo <a4651386@163.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/char/console.c