Re: 3.14-rc2 XFS backtrace because irqs_disabled.

From: Linus Torvalds
Date: Tue Feb 11 2014 - 21:52:27 EST


On Tue, Feb 11, 2014 at 5:09 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> Slap the check in vfs_create(), see if interrupts had been disabled by it or
> by something in ->create(). Since it's reproducible...

path_openat() starts off with a get_empty_filp(), which allocates a
file pointer with GFP_KERNEL. So that should have triggered the
might_sleep warning if irq's were already disabled at that point.

So it's not before that - in particular, it's not in the signal
handling or do_coredump() paths.

Also, at least xfs_buf_lock() - which is much deeper in that chain -
does a down(&bp->b_sema). I'm disguested that that doesn't have a
might_sleep() in it.

Dave, mind adding a "might_sleep()" to the top of
"down[_interruptible]()". It's silly to not have coverage of semaphore
use in bad contexts.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/