From cb8f929ddbdaa6417b0cadb5567d7eee566c3d9e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 27 Jul 2007 13:35:43 +1000 Subject: [PATCH] --- yaml --- r: 63115 b: refs/heads/master c: a8a11f06973fa63ad692a8f97694cb5eeb70b3f3 h: refs/heads/master i: 63113: a4936c399cd32339983c6501b8d532a98617a437 63111: fbe33ac7260b607563f1036821da74685bdbef4e v: v3 --- [refs] | 2 +- trunk/drivers/lguest/lguest.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a1d49ce82313..77709e8b880d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dfbab7540569679a91cf43208eff4ef3f4500a5f +refs/heads/master: a8a11f06973fa63ad692a8f97694cb5eeb70b3f3 diff --git a/trunk/drivers/lguest/lguest.c b/trunk/drivers/lguest/lguest.c index 6dfe568523a2..3386b0e76900 100644 --- a/trunk/drivers/lguest/lguest.c +++ b/trunk/drivers/lguest/lguest.c @@ -1019,6 +1019,11 @@ __init void lguest_init(void *boot) * the normal data segment to get through booting. */ asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_DS) : "memory"); + /* Clear the part of the kernel data which is expected to be zero. + * Normally it will be anyway, but if we're loading from a bzImage with + * CONFIG_RELOCATALE=y, the relocations will be sitting here. */ + memset(__bss_start, 0, __bss_stop - __bss_start); + /* The Host uses the top of the Guest's virtual address space for the * Host<->Guest Switcher, and it tells us how much it needs in * lguest_data.reserve_mem, set up on the LGUEST_INIT hypercall. */