Re: [WTF?] sys_tas() on m32r

From: Lee Revell
Date: Fri Dec 23 2005 - 14:05:45 EST


On Fri, 2005-12-23 at 05:55 -0800, Andrew Morton wrote:
> Al Viro <viro@xxxxxxxxxxxxxxxx> wrote:
> >
> > asmlinkage int sys_tas(int *addr)
> > {
> > int oldval;
> > unsigned long flags;
> >
> > if (!access_ok(VERIFY_WRITE, addr, sizeof (int)))
> > return -EFAULT;
> > local_irq_save(flags);
> > oldval = *addr;
> > if (!oldval)
> > *addr = 1;
> > local_irq_restore(flags);
> > return oldval;
> > }
> > in arch/m32r/kernel/sys_m32r.c. Trivial oops *AND* ability to trigger
> > IO with interrupts disabled.
>
> Yeah. I pointed this out to Takata in October last year and then promptly
> forgot about it. It's rather amazing that this code (which appears to be in
> live use in linuxthreads) hasn't generated oopses.

No one uses LinuxThreads anymore?

Even the oldest of the old (Debian stable) have moved to NPTL.

Lee

-
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/