Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1329281 > unrolled thread

[PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put()

Started bySebastian Andrzej Siewior <bigeasy@linutronix.de>
First post2016-02-08 17:40 +0100
Last post2016-02-08 18:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-02-08 17:40 +0100
    Re: [PATCH RT] mm: backing-dev: don't disable IRQs in  wb_congested_put() kbuild test robot <lkp@intel.com> - 2016-02-08 18:00 +0100

#1329281 — [PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put()

FromSebastian Andrzej Siewior <bigeasy@linutronix.de>
Date2016-02-08 17:40 +0100
Subject[PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put()
Message-ID<qZX10-7Mz-13@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1329330 — Re: [PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put()

Fromkbuild test robot <lkp@intel.com>
Date2016-02-08 18:00 +0100
SubjectRe: [PATCH RT] mm: backing-dev: don't disable IRQs in wb_congested_put()
Message-ID<qZXkm-7Uw-21@gated-at.bofh.it>
In reply to#1329281

[Multipart message — attachments visible in raw view] — view raw

Hi Sebastian,

[auto build test ERROR on v4.5-rc3]
[also build test ERROR on next-20160208]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Sebastian-Andrzej-Siewior/mm-backing-dev-don-t-disable-IRQs-in-wb_congested_put/20160209-003634
config: x86_64-randconfig-x011-201606 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   mm/backing-dev.c: In function 'wb_congested_put':
>> mm/backing-dev.c:460:2: error: implicit declaration of function 'local_irq_save_nort' [-Werror=implicit-function-declaration]
     local_irq_save_nort(flags);
     ^
>> mm/backing-dev.c:462:3: error: implicit declaration of function 'local_irq_restore_nort' [-Werror=implicit-function-declaration]
      local_irq_restore_nort(flags);
      ^
>> mm/backing-dev.c:460:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
     local_irq_save_nort(flags);
     ^
   cc1: some warnings being treated as errors

vim +/local_irq_save_nort +460 mm/backing-dev.c

   454	 * Put @congested and destroy it if the refcnt reaches zero.
   455	 */
   456	void wb_congested_put(struct bdi_writeback_congested *congested)
   457	{
   458		unsigned long flags;
   459	
 > 460		local_irq_save_nort(flags);
   461		if (!atomic_dec_and_lock(&congested->refcnt, &cgwb_lock)) {
 > 462			local_irq_restore_nort(flags);
   463			return;
   464		}
   465	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web