Commit 773fd404 authored by Michael Holzheu's avatar Michael Holzheu Committed by Andrei Vagin

criu/pie/parasite-vdso: Handle also systems without VVAR

On s390 we don't use vvar. Therefore vvar_size in not been initialized
and the value remains VVAR_BAD_SIZE.

Fix the BUG() statement to also cover this case.
Signed-off-by: 's avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent aff44dd4
...@@ -44,9 +44,11 @@ static int vdso_remap(char *who, unsigned long from, unsigned long to, size_t si ...@@ -44,9 +44,11 @@ static int vdso_remap(char *who, unsigned long from, unsigned long to, size_t si
/* Park runtime vDSO in some safe place where it can be accessible from restorer */ /* Park runtime vDSO in some safe place where it can be accessible from restorer */
int vdso_do_park(struct vdso_maps *rt, unsigned long park_at, unsigned long park_size) int vdso_do_park(struct vdso_maps *rt, unsigned long park_at, unsigned long park_size)
{ {
unsigned long vvar_size;
int ret; int ret;
BUG_ON((rt->sym.vdso_size + rt->sym.vvar_size) < park_size); vvar_size = (rt->sym.vvar_size == VVAR_BAD_SIZE) ? 0 : rt->sym.vvar_size;
BUG_ON((rt->sym.vdso_size + vvar_size) < park_size);
if (rt->vvar_start != VVAR_BAD_ADDR) { if (rt->vvar_start != VVAR_BAD_ADDR) {
if (rt->sym.vdso_before_vvar) { if (rt->sym.vdso_before_vvar) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment