lguest: allow booting guest with CONFIG_RELOCATABLE=y
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 15 Aug 2011 00:45:10 +0000 (10:15 +0930)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 17 Aug 2011 17:55:53 +0000 (10:55 -0700)
commit3438bc96d02ea314a04759e435e50b5b6177f88c
tree8de80841b5a84def9af260b1e6436e078283dbed
parent2366d7cc46e70064f33be79dc415b069d3122772
lguest: allow booting guest with CONFIG_RELOCATABLE=y

commit e22a539824e8ddb82c87b4f415165ede82e6ab56 upstream.

The CONFIG_RELOCATABLE code tries to align the unpack destination to
the value of 'kernel_alignment' in the setup_hdr.  If that's 0, it
tries to unpack to address 0, which in fact causes the gunzip code
to call 'error("Out of memory while allocating output buffer")'.

The bootloader (ie. the lguest Launcher in this case) should be doing
setting this field; the normal bzImage is 16M, we can use the same.

Reported-by: Stefanos Geraggelos <sgerag@cslab.ece.ntua.gr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/virtual/lguest/lguest.c