[PATCH 2/2] raid5: Use local_irq_save_nort() in raid5_release_stripe().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alexander GQ Gerasiov <gq@xxxxxxxxxxx>

This will fix the following warning:

[ ] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993
[ ] in_atomic(): 0, irqs_disabled(): 1, pid: 1482, name: mdadm
[ ] CPU: 0 PID: 1482 Comm: mdadm Not tainted 4.9.20-rt16-stand6-686 #1
[ ] Hardware name: Supermicro SYS-5027R-WRF/X9SRW-F, BIOS 3.2a 10/28/2015
[ ]  ec6c1bcc c12cdc6f c1078f0a eca41880 ec6c1bfc c10787c1 c1668778 00000000
[ ]  00000001 000005ca eca41d84 00000000 80000000 ecce02c0 ecce0000 ecce02c0
[ ]  ec6c1c08 c1584587 ecce1c30 ec6c1c1c c1093ee0 ecce02c0 ecce1c00 ecce0000
[ ] Call Trace:
[ ]  [<c12cdc6f>] dump_stack+0x47/0x68
[ ]  [<c1078f0a>] ? migrate_enable+0x4a/0xf0
[ ]  [<c10787c1>] ___might_sleep+0x101/0x180
[ ]  [<c1584587>] rt_spin_lock+0x17/0x40
[ ]  [<c1093ee0>] atomic_dec_and_spin_lock+0x50/0x70
[ ]  [<f88eda95>] raid5_release_stripe+0x95/0x100 [raid456]
[ ]  [<f88efabd>] grow_one_stripe+0xcd/0xf0 [raid456]
[ ]  [<f88f0274>] setup_conf+0x794/0x900 [raid456]
[ ]  [<f88f11e5>] raid5_run+0xa85/0xcc0 [raid456]

Signed-off-by: Alexander GQ Gerasiov <gq@xxxxxxxxxxx>
---
 drivers/md/raid5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index e69525b5db7d..f879c1b94dba 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -429,7 +429,7 @@ void raid5_release_stripe(struct stripe_head *sh)
 		md_wakeup_thread(conf->mddev->thread);
 	return;
 slow_path:
-	local_irq_save(flags);
+	local_irq_save_nort(flags);
 	/* we are ok here if STRIPE_ON_RELEASE_LIST is set or not */
 	if (atomic_dec_and_lock(&sh->count, &conf->device_lock)) {
 		INIT_LIST_HEAD(&list);
@@ -438,7 +438,7 @@ void raid5_release_stripe(struct stripe_head *sh)
 		spin_unlock(&conf->device_lock);
 		release_inactive_stripe_list(conf, &list, hash);
 	}
-	local_irq_restore(flags);
+	local_irq_restore_nort(flags);
 }
 
 static inline void remove_hash(struct stripe_head *sh)
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux