[LTP] [linux-next:master] [block/bdev] 3c20917120: BUG:sleeping_function_called_from_invalid_context_at_mm/util.c

Sebastian Andrzej Siewior bigeasy@linutronix.de
Mon Mar 31 09:45:41 CEST 2025


On 2025-03-28 17:08:38 [-0700], Luis Chamberlain wrote:
…
> > Are there some preemption configs under which cond_resched() won't
> > trigger a kernel splat where expected so the only thing I can think of
> > is perhaps some preempt configs don't implicate a sleep? If true,
> > instead of adding might_sleep() to one piece of code (in this case
> > foio_mc_copy()) I wonder if instead just adding it to cond_resched() may
> > be useful.
> 
> I think the answer to the above is "no".

I would say so. You need CONFIG_DEBUG_ATOMIC_SLEEP for the might-sleep
magic to work. And then the splat from might_sleep() isn't different
than the one from cond_resched(). 

> 
>   Luis

Sebastian


More information about the ltp mailing list