public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-rt-users@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put()
Date: Mon, 8 Feb 2016 17:33:41 +0100	[thread overview]
Message-ID: <20160208163341.GA15956@linutronix.de> (raw)

it triggers:
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:930
|in_atomic(): 0, irqs_disabled(): 1, pid: 12, name: rcuc/0
|1 lock held by rcuc/0/12:
| #0:  (rcu_callback){......}, at: [<ffffffff810ce1a6>] rcu_cpu_kthread+0x376/0xb10
|irq event stamp: 23636
|hardirqs last  enabled at (23635): [<ffffffff8173524c>] _raw_spin_unlock_irqrestore+0x6c/0x80
|hardirqs last disabled at (23636): [<ffffffff81173918>] wb_congested_put+0x18/0x90
| [<ffffffff81735434>] rt_spin_lock+0x24/0x60
| [<ffffffff810afed2>] atomic_dec_and_spin_lock+0x52/0x90
| [<ffffffff81173928>] wb_congested_put+0x28/0x90
| [<ffffffff813b833e>] __blkg_release_rcu+0x5e/0x1e0
| [<ffffffff813b8367>] ? __blkg_release_rcu+0x87/0x1e0
| [<ffffffff813b82e0>] ? blkg_conf_finish+0x90/0x90
| [<ffffffff810ce1e7>] rcu_cpu_kthread+0x3b7/0xb10

due to cgwb_lock beeing taken with spin_lock_irqsave() usually.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 mm/backing-dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 7340353f8aea..b2ca2908b808 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -457,9 +457,9 @@ void wb_congested_put(struct bdi_writeback_congested *congested)
 {
 	unsigned long flags;
 
-	local_irq_save(flags);
+	local_irq_save_nort(flags);
 	if (!atomic_dec_and_lock(&congested->refcnt, &cgwb_lock)) {
-		local_irq_restore(flags);
+		local_irq_restore_nort(flags);
 		return;
 	}
 
-- 
2.7.0

             reply	other threads:[~2016-02-08 16:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 16:33 Sebastian Andrzej Siewior [this message]
2016-02-08 16:49 ` [PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put() kbuild test robot

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=20160208163341.GA15956@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.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