linux-mips
[Top] [All Lists]

RE: Unaligned address handling, and the cause of that login prob

To: Mike Klar <mfklar@ponymail.com>
Subject: RE: Unaligned address handling, and the cause of that login prob
From: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Date: Mon, 17 Apr 2000 18:33:34 +0200 (CEST)
Cc: linux-mips@fnet.fr, linux@cthulhu.engr.sgi.com
In-reply-to: <NDBBIDGAOKMNJNDAHDDMAEGGCJAA.mfklar@ponymail.com>
Organization: none
Reply-to: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Sender: owner-linuxmips@oss.sgi.com
On 16-Apr-00 Mike Klar wrote:
> While tracking down a random memory corruption bug, I stumbled across the
> cause of that telnet/ssh problem in recent kernels reported about a month
> ago:
> 
> The version of down_trylock() for CPUs with support LL/SC assumes that
> struct semaphore is 64-bit aligned, since it accesses count and waking as a
> single dualword (with lld/scd).

Good spotted. This is perfectly in line with my observation that telnet/ssh
worked perfectly well if you built a kernel without CONFIG_CPU_HAS_LLSC.

The attached patch seems to fix this, and another bug in
waking_non_zero_interruptible() as well.

Telnet is working again :)

-- 
Regards,
Harald

Attachment: sema-fix-041700
Description: sema-fix-041700

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