Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1784396imm; Thu, 27 Sep 2018 02:25:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Pga/PVofSawUsUdZPghSLCAcN7WDTahRdjFMR9izbjqAQeOTtfCeE9uhZiW1xsA0jdxmT X-Received: by 2002:a17:902:d685:: with SMTP id v5-v6mr10034281ply.42.1538040329336; Thu, 27 Sep 2018 02:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538040329; cv=none; d=google.com; s=arc-20160816; b=VIFQYJLa2mEggmKuhHX+dOY4zW8MJlIpt4DdfMTcXZ1tgcHBVrVLKIqoOgZoZdMZ0l lFg/krhDu8GT72WbWfhJdMN4p5g/d6xenZwC0k7HmDoSLI7hdC4mEPvZ1fsKHfFfybAT /YjxXaj4vup+ZpxvTYoUJjBuL2FRgwMy0EdZ4T53HQM/ccLr1/DDLf0/THHsTZoBgcsz EdFZNxgvkzVyKx5kTZHKf6V86YN3IYSEbimPklZlfB1uqm/K555ZdQVbgZt/dgIFlkNT o5aMugTeg3nvcvqhz4Cel0zv6PNw0W/PGLMvecb+nxLRdJ6Ewv8aDngYXyNvgbIurPFV 2nqQ== 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; bh=dQr5N2xukOBYkoMZoq2Mw0hBgj2ntzcZSz1afmtbnxc=; b=QbYDCogPx1IfzLSXvN8Kg57tw4E/WOL6sPkUZFk04Vz+X5ZsWQ/W6sKSjsAppOjyla bBSciFqqAfkcPhDBToWuO4nsCCuj4UaTu/mclGdbcmj+QBjpDDsdqvxEJB4YICDqFV92 VY2mDVNufwJLV4QCVn3HOrfux5aoU5WtOUm7oRSIT7yY63Hq/INYKIyrSeM+S+DAWjTr +TTO8PAjs3yHxikTiOJOnP5whelQAVRZbvzMIBsGiKIIzRnyG4kEPyDjzS35ELqyOEi8 1DwlNZDMjQK7iFVMXDpc9upwv7KX5CBsS2UQz0CQTkjeGqas7rOPUeTV19Hga3QN+SdY 2h9g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14-v6si1563955plo.208.2018.09.27.02.25.14; Thu, 27 Sep 2018 02:25:29 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727736AbeI0PlG (ORCPT + 99 others); Thu, 27 Sep 2018 11:41:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56618 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727154AbeI0PlF (ORCPT ); Thu, 27 Sep 2018 11:41:05 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 34EE81113; Thu, 27 Sep 2018 09:23:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, John Crispin Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grygorii Strashko , Thomas Gleixner , Frederic Weisbecker , Ingo Molnar , Anna-Maria Gleixner , Geert Uytterhoeven Subject: [PATCH 4.14 63/64] tick/nohz: Prevent bogus softirq pending warning Date: Thu, 27 Sep 2018 11:04:20 +0200 Message-Id: <20180927090258.473509321@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927090249.801943776@linuxfoundation.org> References: <20180927090249.801943776@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Gleixner Commit 0a0e0829f990 ("nohz: Fix missing tick reprogram when interrupting an inline softirq") got backported to stable trees and now causes the NOHZ softirq pending warning to trigger. It's not an upstream issue as the NOHZ update logic has been changed there. The problem is when a softirq disabled section gets interrupted and on return from interrupt the tick/nohz state is evaluated, which then can observe pending soft interrupts. These soft interrupts are legitimately pending because they cannot be processed as long as soft interrupts are disabled and the interrupted code will correctly process them when soft interrupts are reenabled. Add a check for softirqs disabled to the pending check to prevent the warning. Reported-by: Grygorii Strashko Reported-by: John Crispin Signed-off-by: Thomas Gleixner Tested-by: Grygorii Strashko Tested-by: John Crispin Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Anna-Maria Gleixner Cc: stable@vger.kernel.org Fixes: 2d898915ccf4838c ("nohz: Fix missing tick reprogram when interrupting an inline softirq") Acked-by: Frederic Weisbecker Tested-by: Geert Uytterhoeven --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -908,7 +908,7 @@ static bool can_stop_idle_tick(int cpu, if (unlikely(local_softirq_pending() && cpu_online(cpu))) { static int ratelimit; - if (ratelimit < 10 && + if (ratelimit < 10 && !in_softirq() && (local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) { pr_warn("NOHZ: local_softirq_pending %02x\n", (unsigned int) local_softirq_pending());