From 609f0e2658c3719ee216d1f7ca62c4b728a3433a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 22 Sep 2009 19:57:51 -0700 Subject: [PATCH] --- yaml --- r: 164895 b: refs/heads/master c: 18c1e2c80d92adca50ffc654617639a4aa35f29c h: refs/heads/master i: 164893: fe069f6006d70a4e8160b64dd430aac7bcd08857 164891: 701d293aa2a88fb05a26a4c8957fa6426bc2ff8f 164887: 64f493298b983974bdf817f1ed781d68fd61774a 164879: e4a53f6daeceaa31f54b25a6bdb8ad1bf9290ca3 164863: 2e05ccbbf71351aebbc2ab5976b95343b41d6c15 v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/syscall.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index a94eac31b336..d64815c09678 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 268e46712d57a6493cc0f98e7d200a0f674c31ed +refs/heads/master: 18c1e2c80d92adca50ffc654617639a4aa35f29c diff --git a/trunk/arch/x86/include/asm/syscall.h b/trunk/arch/x86/include/asm/syscall.h index d82f39bb7905..8d33bc5462d1 100644 --- a/trunk/arch/x86/include/asm/syscall.h +++ b/trunk/arch/x86/include/asm/syscall.h @@ -1,7 +1,7 @@ /* * Access to user system call parameters and results * - * Copyright (C) 2008 Red Hat, Inc. All rights reserved. + * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions @@ -16,13 +16,13 @@ #include #include -static inline long syscall_get_nr(struct task_struct *task, - struct pt_regs *regs) +/* + * Only the low 32 bits of orig_ax are meaningful, so we return int. + * This importantly ignores the high bits on 64-bit, so comparisons + * sign-extend the low 32 bits. + */ +static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { - /* - * We always sign-extend a -1 value being set here, - * so this is always either -1L or a syscall number. - */ return regs->orig_ax; }