]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0287-mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
Fix memguard and related syscalls
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0287-mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
1 From 62d0f0ee8aeef0320502bf7b5805d4557ddb952d Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Fri, 5 Feb 2016 12:17:14 +0100
4 Subject: [PATCH 287/366] mm: backing-dev: don't disable IRQs in
5  wb_congested_put()
6
7 it triggers:
8 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:930
9 |in_atomic(): 0, irqs_disabled(): 1, pid: 12, name: rcuc/0
10 |1 lock held by rcuc/0/12:
11 | #0:  (rcu_callback){......}, at: [<ffffffff810ce1a6>] rcu_cpu_kthread+0x376/0xb10
12 |irq event stamp: 23636
13 |hardirqs last  enabled at (23635): [<ffffffff8173524c>] _raw_spin_unlock_irqrestore+0x6c/0x80
14 |hardirqs last disabled at (23636): [<ffffffff81173918>] wb_congested_put+0x18/0x90
15 | [<ffffffff81735434>] rt_spin_lock+0x24/0x60
16 | [<ffffffff810afed2>] atomic_dec_and_spin_lock+0x52/0x90
17 | [<ffffffff81173928>] wb_congested_put+0x28/0x90
18 | [<ffffffff813b833e>] __blkg_release_rcu+0x5e/0x1e0
19 | [<ffffffff813b8367>] ? __blkg_release_rcu+0x87/0x1e0
20 | [<ffffffff813b82e0>] ? blkg_conf_finish+0x90/0x90
21 | [<ffffffff810ce1e7>] rcu_cpu_kthread+0x3b7/0xb10
22
23 due to cgwb_lock beeing taken with spin_lock_irqsave() usually.
24
25 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
26 ---
27  mm/backing-dev.c | 4 ++--
28  1 file changed, 2 insertions(+), 2 deletions(-)
29
30 diff --git a/mm/backing-dev.c b/mm/backing-dev.c
31 index 9ef80bf..826fed5 100644
32 --- a/mm/backing-dev.c
33 +++ b/mm/backing-dev.c
34 @@ -457,9 +457,9 @@ void wb_congested_put(struct bdi_writeback_congested *congested)
35  {
36         unsigned long flags;
37  
38 -       local_irq_save(flags);
39 +       local_irq_save_nort(flags);
40         if (!atomic_dec_and_lock(&congested->refcnt, &cgwb_lock)) {
41 -               local_irq_restore(flags);
42 +               local_irq_restore_nort(flags);
43                 return;
44         }
45  
46 -- 
47 1.9.1
48