kexec, x86: Fix incorrect jump back address if not
commit16c6bf2102869f5d3afeaf26b0c14aeb1db7bcb7
authorHuang Ying <ying.huang@intel.com>
Thu, 14 Jul 2011 01:34:37 +0000 (14 09:34 +0800)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:55:00 +0000 (1 13:55 -0700)
tree4d16de2a69e294aac733f4a1f879db9d7ec779fe
parent68a7b5709fe88c2ed64ff7e0d088ff4b85703169
kexec, x86: Fix incorrect jump back address if not

[ upstream commit 050438ed5a05b25cdf287f5691e56a58c2606997 ]
 preserving context

In kexec jump support, jump back address passed to the kexeced
kernel via function calling ABI, that is, the function call
return address is the jump back entry.

Furthermore, jump back entry == 0 should be used to signal that
the jump back or preserve context is not enabled in the original
kernel.

But in the current implementation the stack position used for
function call return address is not cleared context
preservation is disabled. The patch fixes this bug.

Reported-and-tested-by: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1310607277-25029-1-git-send-email-ying.huang@intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/relocate_kernel_32.S
arch/x86/kernel/relocate_kernel_64.S