Received: by 10.213.65.68 with SMTP id h4csp1745973imn; Sun, 1 Apr 2018 13:53:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/7uPKltZqTt+gl04yQLZwIlqMSX77Aa2KZOmNhe9+riFHCjViKsgNvr9vk/Dv40gY1hUW9 X-Received: by 2002:a17:902:43:: with SMTP id 61-v6mr1632701pla.259.1522615983901; Sun, 01 Apr 2018 13:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522615983; cv=none; d=google.com; s=arc-20160816; b=bpabn9zZM5OyXFRswYJ7/snsxxm/x3pNBodmCiOKdk6h5A9ehlqfse1BqSKCxY6qqx OmSHKnl0ZoRzNIEETMOpNDznw+WqYXhyAgMcWVE07xMTgHhu29AtTU4oRna+g4ZM+5Bk E+Rsocv249RmE7gJ1/HvHOg6ovpNKnfdH24P2JYevFIx4UjVkhCEVHpXyFLZO7QtjiI1 ieaWjFgUhN9CbA3oY9H5NrUcSh/FOkyWU8MxygKijQRtzcnQEHnaaBJE4kgH8KJfM3Nk EgF5Vcx1nSo0/oar81np0sfF1uYgwjDckbFceuBNbmf9L4X4vy++qneXmpsmtXUW6thN 9XZw== 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:to:from:subject :organization:arc-authentication-results; bh=4X7f3tmBOdLNRoO0954l77PJUis9GuEvDbiWWxHIfSY=; b=wE57d9lcRYmIlH4XrFKN6swubQEL3P3GUd382di1wO3tWxbGi/k4BxobrguDMiHReN c4fUQlJcwGzfa6c9EHI3x4d8YD7zwniXP01snRhXp340RaT3h8u58xIZ7nfQnVga+cVQ 3r5GkHG8PRESq6ettpBqTfsbMpqDSgbXLFTgRBytY9zDPFC+QVZXXa+C/zjmeCBn4V3Z 9ZPd+3wXo2/KXuTh8FwMABY3cLcnZS2ZYBEiRvFKEa8ABUtMoSaTooaW5cUOE0ccpFOn VygNuK2pQFtIQstM0TkVcIBFS6EMXJHnr8qU+C29xNNKh6Zq6t/+GTtLIZz8CGnl9zLe FLGg== 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 j33-v6si13271464pld.395.2018.04.01.13.52.49; Sun, 01 Apr 2018 13:53:03 -0700 (PDT) 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 S1753989AbeDAUkc (ORCPT + 99 others); Sun, 1 Apr 2018 16:40:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52952 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753977AbeDAUk3 (ORCPT ); Sun, 1 Apr 2018 16:40:29 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 421D3A27C4 for ; Sun, 1 Apr 2018 20:40:28 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-59.rdu2.redhat.com [10.10.120.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id E661FD7DF5; Sun, 1 Apr 2018 20:40:27 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 02/45] Fix exception_enter() return value From: David Howells To: linux-kernel@vger.kernel.org Date: Sun, 01 Apr 2018 21:40:27 +0100 Message-ID: <152261522745.30503.11022506204837457606.stgit@warthog.procyon.org.uk> In-Reply-To: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> References: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sun, 01 Apr 2018 20:40:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sun, 01 Apr 2018 20:40:28 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the return value of exception_enter() to return CONTEXT_KERNEL rather than 0 when the facility is disabled as the function returns an ctx_state enum rather than a plain integer. Signed-off-by: David Howells --- include/linux/context_tracking.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h index d05609ad329d..b4e9f9d80745 100644 --- a/include/linux/context_tracking.h +++ b/include/linux/context_tracking.h @@ -50,7 +50,7 @@ static inline enum ctx_state exception_enter(void) enum ctx_state prev_ctx; if (!context_tracking_is_enabled()) - return 0; + return CONTEXT_KERNEL; prev_ctx = this_cpu_read(context_tracking.state); if (prev_ctx != CONTEXT_KERNEL) @@ -85,7 +85,7 @@ static inline void user_enter(void) { } static inline void user_exit(void) { } static inline void user_enter_irqoff(void) { } static inline void user_exit_irqoff(void) { } -static inline enum ctx_state exception_enter(void) { return 0; } +static inline enum ctx_state exception_enter(void) { return CONTEXT_KERNEL; } static inline void exception_exit(enum ctx_state prev_ctx) { } static inline enum ctx_state ct_state(void) { return CONTEXT_DISABLED; } #endif /* !CONFIG_CONTEXT_TRACKING */