mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
minios: clear FB content since _xmalloc may return non-zeroed memory
(in debug mode, notably). Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
This commit is contained in:
1 parent
de239d043f
commit
a58e7325d6
1 file changed
+2
-5
@@ -303,13 +303,10 @@ static void fbfront_thread(void *p)
|
||||
|
||||
memsize = n * PAGE_SIZE;
|
||||
fb = _xmalloc(memsize, PAGE_SIZE);
|
||||
memset(fb, 0, memsize);
|
||||
mfns = xmalloc_array(unsigned long, n);
|
||||
for (i = 0; i < n; i++) {
|
||||
/* trigger CoW */
|
||||
((char *) fb) [i * PAGE_SIZE] = 0;
|
||||
barrier();
|
||||
for (i = 0; i < n; i++)
|
||||
mfns[i] = virtual_to_mfn((char *) fb + i * PAGE_SIZE);
|
||||
}
|
||||
fb_dev = init_fbfront(NULL, mfns, WIDTH, HEIGHT, DEPTH, line_length, n);
|
||||
xfree(mfns);
|
||||
if (!fb_dev) {
|
||||
|
||||