Skip to content

Commit 94cac01

Browse files
Sebastian Andrzej Siewiorrostedt
Sebastian Andrzej Siewior
authored andcommitted
md/raid5: do not disable interrupts
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 |in_atomic(): 0, irqs_disabled(): 1, pid: 2992, name: lvm |CPU: 2 PID: 2992 Comm: lvm Not tainted 4.13.10-rt3+ #54 |Call Trace: | dump_stack+0x4f/0x65 | ___might_sleep+0xfc/0x150 | atomic_dec_and_spin_lock+0x3c/0x80 | raid5_release_stripe+0x73/0x110 | grow_one_stripe+0xce/0xf0 | setup_conf+0x841/0xaa0 | raid5_run+0x7e7/0xa40 | md_run+0x515/0xaf0 | raid_ctr+0x147d/0x25e0 | dm_table_add_target+0x155/0x320 | table_load+0x103/0x320 | ctl_ioctl+0x1d9/0x510 | dm_ctl_ioctl+0x9/0x10 | do_vfs_ioctl+0x8e/0x670 | SyS_ioctl+0x3c/0x70 | entry_SYSCALL_64_fastpath+0x17/0x98 The interrupts were disabled because ->device_lock is taken with interrupts disabled. Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
1 parent 85fb99a commit 94cac01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/md/raid5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ void raid5_release_stripe(struct stripe_head *sh)
410410
md_wakeup_thread(conf->mddev->thread);
411411
return;
412412
slow_path:
413-
local_irq_save(flags);
413+
local_irq_save_nort(flags);
414414
/* we are ok here if STRIPE_ON_RELEASE_LIST is set or not */
415415
if (atomic_dec_and_lock(&sh->count, &conf->device_lock)) {
416416
INIT_LIST_HEAD(&list);
@@ -419,7 +419,7 @@ void raid5_release_stripe(struct stripe_head *sh)
419419
spin_unlock(&conf->device_lock);
420420
release_inactive_stripe_list(conf, &list, hash);
421421
}
422-
local_irq_restore(flags);
422+
local_irq_restore_nort(flags);
423423
}
424424

425425
static inline void remove_hash(struct stripe_head *sh)

0 commit comments

Comments
 (0)