Skip to contentSkip to conversation

ppc vdso: make sure rc is defined

PATCH In review Serge E. Hallyn 2 participants 3 messages Jul 6, 2009 – Jul 7, 2009 2 messages not in the archive PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ppc vdso: make sure rc is defined

---
 arch/powerpc/kernel/vdso.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/kernel/vdso.c +3 -1
index 48beff6..679b394 100644
@@ -240,8 +240,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
 	}
 
 	/* for restart(2), double check that we got we asked for */
-	if (start && vdso_base != start)
+	if (start && vdso_base != start) {
+		rc = -EBUSY;
 		goto fail_mmapsem;
+	}
 
 	/*
 	 * our vma flags don't have VM_WRITE so by default, the process isn't
Signature · 1 line
1.6.2.3

A message that is not in the archive (sent off-list or not yet received): 20090706233425.GA3186-r/[email protected]

#2 lore raw
Quoted 11 lines · Serge E. Hallyn
---
 arch/powerpc/kernel/vdso.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/kernel/vdso.c +0 -0
index 48beff6..679b394 100644
@@ -240,8 +240,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
 	}

arch/powerpc/kernel/vdso.c int arch_setup_additional_pages(struct linux_binprm *bprm, · line 249

Quoted 10 lines
arch/powerpc/kernel/vdso.c +3 -1
 
 	/* for restart(2), double check that we got we asked for */
-	if (start && vdso_base != start)
+	if (start && vdso_base != start) {
+		rc = -EBUSY;
 		goto fail_mmapsem;
+	}
 
 	/*
 	 * our vma flags don't have VM_WRITE so by default, the process isn't

Is this why you sent this patch?

cc1: warnings being treated as errors
arch/powerpc/kernel/vdso.c: In function arch_setup_additional_pages:
arch/powerpc/kernel/vdso.c:194: error: rc may be used uninitialized in this function

If so, looks fine to me.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 20 lines · Nathan Lynch
Quoted 19 lines · Serge E. Hallyn
---
 arch/powerpc/kernel/vdso.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/kernel/vdso.c +3 -1
index 48beff6..679b394 100644
@@ -240,8 +240,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
 	}
 
 	/* for restart(2), double check that we got we asked for */
-	if (start && vdso_base != start)
+	if (start && vdso_base != start) {
+		rc = -EBUSY;
 		goto fail_mmapsem;
+	}
 
Quoted 8 lines

arch/powerpc/kernel/vdso.c int arch_setup_additional_pages(struct linux_binprm *bprm, · line 249

Quoted 2 lines
arch/powerpc/kernel/vdso.c +0 -0
 	/*
 	 * our vma flags don't have VM_WRITE so by default, the process isn't

Is this why you sent this patch?

cc1: warnings being treated as errors
arch/powerpc/kernel/vdso.c: In function arch_setup_additional_pages:
arch/powerpc/kernel/vdso.c:194: error: rc may be used uninitialized in this function

Yup.

Quoted 1 line

If so, looks fine to me.

-serge