Re: sched: fair: NULL ptr deref in check_preempt_wakeup

From: Peter Zijlstra
Date: Sun Feb 16 2014 - 14:19:28 EST


On Sat, Feb 15, 2014 at 06:27:52PM -0500, Sasha Levin wrote:
> Hi folks,
>
> While fuzzing with trinity inside a KVM tools guest running latest -next kernel, I've
> stumbled on the following:
>
> [ 522.645288] BUG: unable to handle kernel NULL pointer dereference at 0000000000000150
> [ 522.646271] IP: [<ffffffff81186c6f>] check_preempt_wakeup+0x11f/0x210
>
> Since it's pretty inlined, the code points to:
>
> check_preempt_wakeup()
> find_matching_se()
> find_matching_se()
> check_preempt_wakeup()
>
>
> static inline struct cfs_rq *
> is_same_group(struct sched_entity *se, struct sched_entity *pse)
> {
> if (se->cfs_rq == pse->cfs_rq) <=== HERE
> return se->cfs_rq;
>
> return NULL;
> }

Hrm.. that means we got se->depth wrong. I'll have a poke tomorrow.
--
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/