[PATCH] It's your lucky day (was: Re: spin_lock bug on Sparc SMP)

David S. Miller (davem@redhat.com)
Wed, 29 Sep 1999 16:23:52 -0700


Try this on for size, many of your lockup reports were incomplete and
this is why I couldn't see this bug immediately until I reproduced it
myself here locally:

--- arch/sparc/mm/fault.c.~1~ Sat Aug 7 03:43:57 1999
+++ arch/sparc/mm/fault.c Wed Sep 29 23:27:12 1999
@@ -415,31 +415,25 @@
{
unsigned long sp;

- lock_kernel();
sp = current->tss.rwbuf_stkptrs[0];
if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK))
force_user_fault(sp + 0x38, 1);
force_user_fault(sp, 1);
- unlock_kernel();
}

void window_underflow_fault(unsigned long sp)
{
- lock_kernel();
if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK))
force_user_fault(sp + 0x38, 0);
force_user_fault(sp, 0);
- unlock_kernel();
}

void window_ret_fault(struct pt_regs *regs)
{
unsigned long sp;

- lock_kernel();
sp = regs->u_regs[UREG_FP];
if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK))
force_user_fault(sp + 0x38, 0);
force_user_fault(sp, 0);
- unlock_kernel();
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/