public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [WTF?] sys_tas() on m32r
@ 2005-12-23  6:15 Al Viro
  2005-12-23  7:50 ` liyu
  2005-12-23 13:55 ` Andrew Morton
  0 siblings, 2 replies; 10+ messages in thread
From: Al Viro @ 2005-12-23  6:15 UTC (permalink / raw)
  To: linux-kernel

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-12-28  0:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-23  6:15 [WTF?] sys_tas() on m32r Al Viro
2005-12-23  7:50 ` liyu
2005-12-23  7:54   ` Al Viro
2005-12-23 13:55 ` Andrew Morton
2005-12-23 19:10   ` Lee Revell
2005-12-27  6:36     ` Hirokazu Takata
2005-12-27  9:34     ` Jesper Juhl
2005-12-27  5:27   ` Hirokazu Takata
2005-12-27 13:22     ` Andrew Morton
2005-12-28  0:36       ` Hirokazu Takata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox