public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Will Deacon <will.deacon@arm.com>
Cc: linux-kernel@vger.kernel.org, Dave Airlie <airlied@redhat.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH stable-4.9.y] locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness
Date: Thu, 24 Jan 2019 20:04:05 +0100	[thread overview]
Message-ID: <20190124190405.GB32078@kroah.com> (raw)
In-Reply-To: <20190124185415.29830-1-will.deacon@arm.com>

On Thu, Jan 24, 2019 at 06:54:15PM +0000, Will Deacon wrote:
> From: Dave Airlie <airlied@redhat.com>
> 
> This commit is not required upstream, but is required for the 4.9.y
> stable series.
> 
> Upstream commit 101110f6271c ("Kbuild: always define endianess in
> kconfig.h") ensures that either __LITTLE_ENDIAN or __BIG_ENDIAN is
> defined to reflect the endianness of the target CPU architecture
> regardless of whether or not <asm/byteorder.h> has been #included. The
> upstream definition of 'struct qspinlock' relies on this property.
> 
> Unfortunately, the 4.9.y stable series does not provide this guarantee,
> so the 'spin_unlock()' routine can erroneously treat the underlying
> lockword as big-endian on little-endian architectures using native
> qspinlock (i.e. x86_64 without PV) if the caller has not included
> <asm/byteorder.h>. This can lead to hangs such as the one in
> 'i915_gem_request()' reported via bugzilla:
> 
>   https://bugzilla.kernel.org/show_bug.cgi?id=202063
> 
> Fix the issue by ensuring that <asm/byteorder.h> is #included in
> <asm/qspinlock_types.h>, where 'struct qspinlock' is defined.

That is crazy...

Thanks for the patch, now queued up.

greg k-h

  reply	other threads:[~2019-01-24 19:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 18:54 [PATCH stable-4.9.y] locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness Will Deacon
2019-01-24 19:04 ` Greg KH [this message]
2019-01-24 19:14   ` David Airlie

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=20190124190405.GB32078@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=airlied@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=will.deacon@arm.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