Re: [PATCH RFC 2/8] blackfin: implement syscall restart generically

From: Mike Frysinger
Date: Tue Oct 25 2011 - 20:02:03 EST


On Sun, Oct 23, 2011 at 06:19, Jonas Bonn <jonas@xxxxxxxxxxxx> wrote:
> --- a/arch/blackfin/include/asm/syscall.h
> +++ b/arch/blackfin/include/asm/syscall.h
>
> Âstatic inline long
> Âsyscall_get_nr(struct task_struct *task, struct pt_regs *regs)
> Â{
> - Â Â Â return regs->p0;
> + Â Â Â return regs->orig_p0;
> Â}

i'm not sure this is correct. we set the orig_p0 to -1 when forcing
the syscall to go to restart. shouldn't syscall_get_nr() still return
the right value ?

> Âsyscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
> Â Â Â Â Â Â Â Â Â Â Â Â Âint error, long val)
> Â{
> - Â Â Â regs->r0 = error ? -error : val;
> + Â Â Â regs->r0 = error ? error : val;
> Â}

this fix is unrelated (and unmentioned in the changelog). i also see
a bunch of other arches doing this. so we should pull this change out
into a dedicated patchset, and fix all the arches at the same time.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/