Re: [RFC/RFT PATCH v3] sched: automated per tty task groups
From: Linus Torvalds
Date: Mon Nov 15 2010 - 20:19:16 EST
Hmm. Just found a bug. I'm not sure if it's the autogroup patches
themselves, or whether it's just the cgroup code that the autogroup
patch enables for me.
When I do
echo t > /proc/sysrq-trigger
(or "w") I get a NULL pointer dereference (offset 0x38 - decimal 56)
in "cgroup_path+0x7", with a call trace of sched_debug_show,
show_state_filter, sysrq_handle_showstate_blocked. I don't have the
whole oops, because the machine is really dead at that point
(presumably died holding the runqueue lock or some other critical
resource), but if required I could take a photo of it. However, I bet
it is repeatable, so I doubt you need it.
Anyway, that "cgroup_path+0x7" is the very first memory dereference:
movq 56(%rdi), %rsi # cgrp_5(D)->dentry, _________p1
so sched_debug_show() is apparently calling cgroup_path() with a NULL
cgroup. I think it's "print_task()" that is to blame, it does
cgroup_path(task_group(p)->css.cgroup, ..
without checking whether there _is_ any css.cgroup.
Peter, that looks like your code (commit d19ca30874f2)
Guys?
Linus
--
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/