stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Anna-Maria Gleixner <anna-maria@linutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	bigeasy@linutronix.de, peterz@infradead.org
Subject: [PATCH 4.9 04/17] nohz: Fix local_timer_softirq_pending()
Date: Tue,  7 Aug 2018 20:51:40 +0200	[thread overview]
Message-ID: <20180807172342.420516148@linuxfoundation.org> (raw)
In-Reply-To: <20180807172342.071526922@linuxfoundation.org>

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Anna-Maria Gleixner <anna-maria@linutronix.de>

commit 80d20d35af1edd632a5e7a3b9c0ab7ceff92769e upstream.

local_timer_softirq_pending() checks whether the timer softirq is
pending with: local_softirq_pending() & TIMER_SOFTIRQ.

This is wrong because TIMER_SOFTIRQ is the softirq number and not a
bitmask. So the test checks for the wrong bit.

Use BIT(TIMER_SOFTIRQ) instead.

Fixes: 5d62c183f9e9 ("nohz: Prevent a timer interrupt storm in tick_nohz_stop_sched_tick()")
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Cc: bigeasy@linutronix.de
Cc: peterz@infradead.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180731161358.29472-1-anna-maria@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 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
@@ -665,7 +665,7 @@ static void tick_nohz_restart(struct tic
 
 static inline bool local_timer_softirq_pending(void)
 {
-	return local_softirq_pending() & TIMER_SOFTIRQ;
+	return local_softirq_pending() & BIT(TIMER_SOFTIRQ);
 }
 
 static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,

  parent reply	other threads:[~2018-08-07 18:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 18:51 [PATCH 4.9 00/17] 4.9.119-stable review Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 01/17] scsi: qla2xxx: Fix ISP recovery on unload Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 02/17] scsi: qla2xxx: Return error when TMF returns Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 03/17] genirq: Make force irq threading setup more robust Greg Kroah-Hartman
2018-08-07 18:51 ` Greg Kroah-Hartman [this message]
2018-08-07 18:51 ` [PATCH 4.9 05/17] netlink: Do not subscribe to non-existent groups Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 06/17] netlink: Dont shift with UB on nlk->ngroups Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 07/17] netlink: Dont shift on 64 for ngroups Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 08/17] ext4: fix false negatives *and* false positives in ext4_check_descriptors() Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 09/17] ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 10/17] ring_buffer: tracing: Inherit the tracing setting to next ring buffer Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 12/17] Btrfs: fix file data corruption after cloning a range and fsync Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 13/17] tcp: add tcp_ooo_try_coalesce() helper Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 14/17] kmemleak: clear stale pointers from task stacks Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 15/17] fork: unconditionally clear stack on fork Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 16/17] IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values Greg Kroah-Hartman
2018-08-07 18:51 ` [PATCH 4.9 17/17] jfs: Fix inconsistency between memory allocation and ea_buf->max_size Greg Kroah-Hartman
2018-08-07 22:32 ` [PATCH 4.9 00/17] 4.9.119-stable review Nathan Chancellor
2018-08-08  2:56 ` Shuah Khan
2018-08-08  5:22 ` Naresh Kamboju
2018-08-08 15:47 ` Guenter Roeck

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=20180807172342.420516148@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=anna-maria@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=bristot@redhat.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).