Skip to contentSkip to conversation

mips: fix error values in case of bad_stack

PATCH Applied Al Viro 2 participants 2 messages Sep 28, 2010 – Oct 14, 2010

Subsystems (2)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 4/5 mips: fix error values in case of bad_stack

we want EFAULT, not -<syscall number>

---
 arch/mips/kernel/scall32-o32.S |    2 +-
 arch/mips/kernel/scall64-o32.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/scall32-o32.S +1 -1
index d3edb9f..da98051 100644
@@ -169,7 +169,7 @@ stackargs:
 	 * We probably should handle this case a bit more drastic.
 	 */
 bad_stack:
-	negu	v0				# error
+	li	v0, EFAULT
 	sw	v0, PT_R2(sp)
 	li	t0, 1				# set error flag
 	sw	t0, PT_R7(sp)
arch/mips/kernel/scall64-o32.S +1 -1
index 7ce0a36..d2bc285 100644
@@ -156,7 +156,7 @@ trace_a_syscall:
 	 * The stackpointer for a call with more than 4 arguments is bad.
 	 */
 bad_stack:
-	dnegu	v0			# error
+	li	v0, EFAULT
 	sd	v0, PT_R2(sp)
 	li	t0, 1			# set error flag
 	sd	t0, PT_R7(sp)
Signature · 1 line
1.5.6.5