From fe7bdb8fedc98cf9ebf6858b6246f5db9e1038da Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 5 Feb 2016 12:17:14 +0100 Subject: [PATCH 114/365] mm: backing-dev: don't disable IRQs in wb_congested_put() 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: [] rcu_cpu_kthread+0x376/0xb10 |irq event stamp: 23636 |hardirqs last enabled at (23635): [] _raw_spin_unlock_irqrestore+0x6c/0x80 |hardirqs last disabled at (23636): [] wb_congested_put+0x18/0x90 | [] rt_spin_lock+0x24/0x60 | [] atomic_dec_and_spin_lock+0x52/0x90 | [] wb_congested_put+0x28/0x90 | [] __blkg_release_rcu+0x5e/0x1e0 | [] ? __blkg_release_rcu+0x87/0x1e0 | [] ? blkg_conf_finish+0x90/0x90 | [] rcu_cpu_kthread+0x3b7/0xb10 due to cgwb_lock beeing taken with spin_lock_irqsave() usually. Signed-off-by: Sebastian Andrzej Siewior --- 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 113b7d317079..2f858ef6211f 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.28.0