Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2355283imu; Thu, 24 Jan 2019 11:16:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN7+RHNbyj4ZyDcPB0yJo+9vYD3lq4c3ADyAdRqZIDnPxdFyCrgwB0BpXTFlkS6qJ8HkERxB X-Received: by 2002:a17:902:8bc6:: with SMTP id r6mr7747136plo.67.1548357376105; Thu, 24 Jan 2019 11:16:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548357376; cv=none; d=google.com; s=arc-20160816; b=UnAgZGfEdu6ZPpWHPpN2YUiRoYdqoe7RKPIoOk9evxGQiVH7W79cHOM0FSzAdGpwyA f5RLCYhCdaOUAeVmKDYHxcDSJne+7fGGH6imY79+EP3L5PCtVODhE+u6qoZE+y6h7JCS cUo7R0owYjg1qWA7AvpgDe+veJEDPgZV5U5o4cBCrrpTn6nwfCwdC850uaO/tDHbAyQs I0/ZXlxq57lQQ6EqzqxI44sGRt6T6nuwU9ELM3zdjzG4HH+xaM4dM0hDYEm/BUXLTzLg USXCROA+A/h6weLj43QVOm6Gh0AKc3OzfKqb2dvvKToNc8B25eEGxyBf1qniwA21qM+I w2Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=1ecRdz3u2fB7hyoMkLTlDiH5Xzlx1hzaFWgNumlTvb0=; b=thw2etBeQ1RirlTGwXaPGEAaiUmtypRI8QNc7dJ1pPRLNr3Zrh5GJzHNITRnMMaGQF zQTloFUYfrfQO0Z3IWBbje2zeMT1ZPkklaBTQU0l1lFiZiTb61vkdbr+m42HptBc83ju z7Gv+OoESJNCrl+Xq7VVgDt+MGPrxSlXJJC6Y1gQYQgocqzA9OjzDDo1jLC0KpW1vIjS PwbIweu5TweFVjlbAgB/rZIBlYO7zNDGuhAyGNfVmoGVdSzka3UY7bLGZmdiwBRwrhHR N9n7Hb1RdjcmxMY7vl1U/u/fD9c2a54+pfmAucb0bKLxxIQJ3JRZKco5HE4/Sm8toCv/ +ljQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si22794215pgs.96.2019.01.24.11.16.00; Thu, 24 Jan 2019 11:16:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728796AbfAXTOf (ORCPT + 99 others); Thu, 24 Jan 2019 14:14:35 -0500 Received: from mail-ua1-f65.google.com ([209.85.222.65]:38284 "EHLO mail-ua1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725909AbfAXTOe (ORCPT ); Thu, 24 Jan 2019 14:14:34 -0500 Received: by mail-ua1-f65.google.com with SMTP id p9so2394789uaa.5 for ; Thu, 24 Jan 2019 11:14:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1ecRdz3u2fB7hyoMkLTlDiH5Xzlx1hzaFWgNumlTvb0=; b=C8HbUXUWV8gIb6UPB/EnDXFLQUf32PP3sjrbqWpcev10ucW0Kwel64zb5HeMZQ4zIi HfZDFyWae9cPTKFRQdWxG+lmAp5+GlciuK8wT/BJ21bbaMRwkUQsnAs1L3DILlTZEqgb mV7TwzXAVoMVOcndaYb+c0dGk+693AyJibmJcnhEs5i9GwWj0+kQCIF08K0Qj7SJVA2I QZeT/hjlnMMnwDbH8PLniTqeRVCxwUyVRGmyFS8I+SzEMtJc4goiiGjYnJwlGGwOsjZ6 ib68ofnRvX57WebXZ+xt7R7omLTg2a9t1E0oSdDFyyAoJer53E7gk2yTXV5eEQxUS9xd h8vQ== X-Gm-Message-State: AJcUukdjpxrW7fTowCfyWJWFMcQB1ol0zTW+HRtMFBsuaxKXMfvYBqoO MxNupyjqgIYJMXNvi9HovGV1b4heUyGMZJHa1Toqnw== X-Received: by 2002:ab0:64d4:: with SMTP id j20mr3284930uaq.86.1548357273759; Thu, 24 Jan 2019 11:14:33 -0800 (PST) MIME-Version: 1.0 References: <20190124185415.29830-1-will.deacon@arm.com> <20190124190405.GB32078@kroah.com> In-Reply-To: <20190124190405.GB32078@kroah.com> From: David Airlie Date: Fri, 25 Jan 2019 05:14:22 +1000 Message-ID: Subject: Re: [PATCH stable-4.9.y] locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness To: Greg KH Cc: Will Deacon , linux-kernel , stable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 25, 2019 at 5:04 AM Greg KH wrote: > > On Thu, Jan 24, 2019 at 06:54:15PM +0000, Will Deacon wrote: > > From: Dave Airlie > > > > 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 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 > > . 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 is #included in > > , where 'struct qspinlock' is defined. > > That is crazy... You've no idea, we've spent a couple of days at LCA figuring it all out :-) Dave.