linux-mips
[Top] [All Lists]

Re: [PATCH] mips_atomic_set fixups (with LLSC)

To: ldavies@agile.tv
Subject: Re: [PATCH] mips_atomic_set fixups (with LLSC)
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Thu, 6 Dec 2001 15:17:59 -0200
Cc: linux-mips@oss.sgi.com
In-reply-to: <3C0F059A.30709@agile.tv>; from ldavies@agile.tv on Thu, Dec 06, 2001 at 03:43:54PM +1000
References: <3C0F059A.30709@agile.tv>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Thu, Dec 06, 2001 at 03:43:54PM +1000, Liam Davies wrote:

> The kernel can be caused to crash when making the following syscall
> sysmips(MIPS_ATOMIC_SET, [unaligned addr], value, 0);
> 
> The latest mips_atomic_set does not use the fixups that are defined
> for the ll/sc instructions.
> 
> If an unaligned address is passed in we take the exception and
> unaligned.c:emulate_load_store_insn ignores the fixups for the
> ll/sc and sends a SIGBUS instead, thus causing the kernel to die.

An unaligned ll/sc instruction in the kernel is a bug in itself as such
it's not unaligned.c that is to blame.  As such I'm going to checkin
a patch that is close but not identical to your patch.

Blame me for this bug, I *knew* and forgot about it ...

  Ralf

<Prev in Thread] Current Thread [Next in Thread>