Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2369898imu; Thu, 24 Jan 2019 11:33:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN616SXgOSPut3Cgx3+6dMv0ev1qWRDT/pjn1wunsCPV992QOFyg9gxGodasDAYqmc8Ceeln X-Received: by 2002:a62:2b8b:: with SMTP id r133mr7809843pfr.246.1548358384977; Thu, 24 Jan 2019 11:33:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548358384; cv=none; d=google.com; s=arc-20160816; b=qj8tkYY+/A7M2VaakKTA7Ku5hr0Ayk5yXJSMqte+VFvKs5Gury00WaHcUQr6L/YAke s9UwXy0Hm1XOkWDZtitjpQNs+q/OWZgF5IT/oZIBPnwbVM2sKIrYEtLgRJX4ewprmHmQ rypmOg3QINcI92xUWBLo2q6nH6Jf0PlHiNMIGMCx33s5F/U/CERbO3eny6LLIFBul/AC kyDk5G41CSrKyv/MYa8pSn0AjA0dzE96WoFFpyqWBUuGAgK4sgIM9EirwCpAeO6MuEnk KxioMsQWqP1vZx9WlM34wH5rVdza2ooMxUnbS1lUdPuIffmEzjtamsNkzPohOeusdset iO3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c/sg3OCG5ReOU3Esv+DWkEucBBnjPIT8s5NWPt+t5Ew=; b=PLlVbGhGUYTaWF46SWrJzbg2juuiricI+nfZA/+q5onPy39xWJJlzAyoz6bMyM4+ZH oTWlVyn8J2xh1RJusFna3G5/GotPqwZhnKr2h5MIoDD1ZtwuM1TNWBlSgpGZItLeLe/0 VunAzGWSG+V7OrD4PI8rxoB3XapB1ZBCbpmYFwsK9YFF1YnkMNSWkIGsOrKCxEMzapXp +jqkf98KB5jT8gTNSylhzFPtqy06/jKonspoYmr4eGLK6J07iydp7bELhmCTH9arO7Oq 8jG1qlzlCdYLb9lJflk8IoJBitsXLgr2VhJ6ETSvJfdmS3av4GTjZBH1W4qWroBc5tJD tMEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yKPG9wPq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a195si24054390pfd.143.2019.01.24.11.32.48; Thu, 24 Jan 2019 11:33:04 -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; dkim=pass header.i=@kernel.org header.s=default header.b=yKPG9wPq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731427AbfAXTad (ORCPT + 99 others); Thu, 24 Jan 2019 14:30:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:58050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730703AbfAXTaa (ORCPT ); Thu, 24 Jan 2019 14:30:30 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16558218E2; Thu, 24 Jan 2019 19:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548358229; bh=fYitXcVpVGKVuGrYeTnAWqgCHhahTJoFZ5LTFudv4gs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yKPG9wPqbM+VFqFxyDi/IvZjELC12NijGtLnpAhBAdQwXAhraTdpZ9UCJzM59sU3H q2r4ifZWKcTALuGOQ8SYQzy8yn1IyY6mfkR5N//WWeuFlm80vDklCLpbH8TTm/Nuzz Vc4jLVhCqt+ZKQAed7WBTtHtIgfBpA/5eduyI6Kc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Airlie , Will Deacon Subject: [PATCH 4.9 39/39] locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness Date: Thu, 24 Jan 2019 20:20:42 +0100 Message-Id: <20190124190449.768201183@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124190448.232316246@linuxfoundation.org> References: <20190124190448.232316246@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ 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. Cc: # 4.9 Signed-off-by: Dave Airlie [will: wrote commit message] Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- include/asm-generic/qspinlock_types.h | 2 ++ 1 file changed, 2 insertions(+) --- a/include/asm-generic/qspinlock_types.h +++ b/include/asm-generic/qspinlock_types.h @@ -18,6 +18,8 @@ #ifndef __ASM_GENERIC_QSPINLOCK_TYPES_H #define __ASM_GENERIC_QSPINLOCK_TYPES_H +#include + /* * Including atomic.h with PARAVIRT on will cause compilation errors because * of recursive header file incluson via paravirt_types.h. So don't include