BUG: sleeping function called from invalid context at include/linux/sched/mm.h:256

Matthew Wilcox willy at infradead.org
Sun Feb 13 15:09:28 AEDT 2022


On Sun, Feb 13, 2022 at 11:19:09AM +0800, Zhouyi Zhou wrote:
> I think the key to the problem lies in your attached console.log
> (pasted below), at times 0.014987 and 0.015995, I see there are two
> locks (cpu_hotplug_lock and jump_label_mutex)  holded while
> kmem_cache_alloc calls __might_resched (0.023356).

Those are both sleeping locks (a percpu_rwsem and mutex, respectively).
There is no problem with sleeping while holding a mutex or rwsem.


More information about the Linuxppc-dev mailing list