Re: [LKP] Re: [jump_label, x86] e7bf1ba97a: BUG:unable_to_handle_page_fault_for_address

From: Peter Zijlstra
Date: Mon Jun 28 2021 - 05:22:38 EST


On Thu, Jun 24, 2021 at 06:32:25AM +0000, Liu, Yujie wrote:
> > > [ 222.094341] BUG: unable to handle page fault for address:
> > > ffffffff83ccffe0
> >
> > I *think* the below might help, can you try?
>
> Hi Peter Z,
>
> We try to apply the patch on commit e7bf1ba97afdd (jump_label, x86: Emit short JMP)
> A new BUG appeared before reaching the BUG reported in previous mail.
> Full dmesg in attachment.

> > @@ -555,6 +558,7 @@ static int __jump_label_mod_text_reserved(void *start, void *end)
> > WARN_ON_ONCE(__module_text_address((unsigned long)end) != mod);
> > if (!try_module_get(mod))
> > mod = NULL;
> > + init = mod->state == MODULE_STATE_COMING;
> > preempt_enable();
> >
> > if (!mod)

*groan*, I'm an idiot... There's an obvious NULL pointer deref right
there.

Let me try locally first before I send yet another dud.