[CRIU] [PATCH] vdso: x86 -- Drop BUG_ON if no pfn found

Cyrill Gorcunov gorcunov at openvz.org
Fri Jul 4 05:16:07 PDT 2014


If pfn = 0 it means we hit something very strange
condition but better to not yield BUG_ON here,
better exit with error for future investigation.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 arch/x86/vdso.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/vdso.c b/arch/x86/vdso.c
index e7c3842c2511..85455a19a350 100644
--- a/arch/x86/vdso.c
+++ b/arch/x86/vdso.c
@@ -127,7 +127,11 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
 		}
 
 		pfn = PME_PFRAME(pfn);
-		BUG_ON(!pfn);
+		if (!pfn) {
+			pr_err("Unexpected page fram number 0 for pid %d\n", pid);
+			ret = -1;
+			goto err;
+		}
 
 		/*
 		 * Setup proper VMA status. Note starting with 3.16
-- 
1.9.3



More information about the CRIU mailing list