Skip to content

Commit 3bb457a

Browse files
Kyle McMartinKyle McMartin
authored andcommitted
[PARISC] Fix bug when syscall nr is __NR_Linux_syscalls
The bug was that we were comparing __NR_syscalls to be greater or equal to the syscall number stored in %r20. __NR_syscalls is one greater than the last syscall though, so we're loading one entry beyond the end of the syscall table, and trying to jump to it. Fix this by only checking that we're greater, alternatively, we could have compared to (__NR_Linux_syscalls - 1) Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
1 parent cc650a7 commit 3bb457a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/parisc/kernel/syscall.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ linux_gateway_entry:
198198
ldil L%sys_call_table, %r1
199199
ldo R%sys_call_table(%r1), %r19
200200
#endif
201-
comiclr,>>= __NR_Linux_syscalls, %r20, %r0
201+
comiclr,>> __NR_Linux_syscalls, %r20, %r0
202202
b,n .Lsyscall_nosys
203203

204204
LDREGX %r20(%r19), %r19

0 commit comments

Comments
 (0)