public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: James Hogan <james.hogan@imgtec.com>
Cc: Huacai Chen <chenhc@lemote.com>, John Crispin <john@phrozen.org>,
	"Steven J . Hill" <Steven.Hill@cavium.com>,
	linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: Fix a long-standing mistake in mips_atomic_set()
Date: Thu, 22 Jun 2017 14:50:24 +0200	[thread overview]
Message-ID: <20170622125024.GB9002@linux-mips.org> (raw)
In-Reply-To: <20170622123159.GA31455@jhogan-linux.le.imgtec.org>

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@vger.kernel.org
> > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> 
> 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

      reply	other threads:[~2017-06-22 13:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 10:45 [PATCH] MIPS: Fix a long-standing mistake in mips_atomic_set() Huacai Chen
2017-06-22 12:31 ` James Hogan
2017-06-22 12:50   ` Ralf Baechle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170622125024.GB9002@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=Steven.Hill@cavium.com \
    --cc=chenhc@lemote.com \
    --cc=james.hogan@imgtec.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=stable@vger.kernel.org \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox