Re: [microcode/load_module] WARNING: CPU: 0 PID: 1444 at kernel/sched/core.c:7094 __might_sleep+0x51/0x16f()

From: Peter Zijlstra
Date: Thu Aug 07 2014 - 08:11:56 EST


On Thu, Aug 07, 2014 at 09:26:15PM +0930, Rusty Russell wrote:
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
> > On Wed, Aug 06, 2014 at 05:12:24AM +0800, Fengguang Wu wrote:
> >> Greetings,
> >>
> >> Here is a microcode/load_module error triggered by debug check commit
> >> 64c2181bc433b17f04da8fe8592aa83cceac9606 ("sched: Debug nested
> >> sleeps"):
>
> Hmm, google lead me to that. Yuck, that's subtle.

It is, hence it would be _good_ to have debug infrastructure to help
out.

> > +++ b/kernel/module.c
> > @@ -3094,6 +3094,28 @@ static int may_init_module(void)
> > return 0;
> > }
> >
> > +int wait_finished_loading(struct module *mod)
> > +{
>
> Is this something we can generalize? At least needs a comment on
> why we don't just use the normal wait_event_interruptible...

I've so far not generalized this because I feel (but maybe other people
feel differently) that we should not do these things if at all possible,
and thus we should not make it too easy.

But sure I can add a comment..

Attachment: pgpwFkvjYbfM0.pgp
Description: PGP signature