Re: [PATCH] MIPS: Fix a long-standing mistake in mips_atomic_set()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 22, 2017 at 01:31:59PM +0100, James Hogan wrote:

> Hi Huacai,
> 
> On Thu, Jun 22, 2017 at 06:45:45PM +0800, Huacai Chen wrote:
> > This mistake comes from the commit f1e39a4a616cd99 ("MIPS: Rewrite
> > sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler"). In the
> > common case 'bnez' should be 'beqz' (as same as older kernels before
> > 2.6.32), otherwise this syscall may cause an endless loop.
> > 
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx>
> 
> Thats a coincidence. 8 years its been broken and I submitted an
> identical patch only a few weeks ago, along with some other related
> fixes:
> 
> https://patchwork.linux-mips.org/project/linux-mips/list/?series=313&state=*

I take it as a proof that everybody is using LL/SC (or the LL/SC emulation)
these days and sysmips(MIPS_ATOMIC_SET) finally has been obsoleted and is
only useful for stoneage binary compatibility.

Which is really good.  Unless people are using silly hacks such as $k0/$k1
being overwriten by exception handlers ...

  Ralf



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]