Re: Linux 3.4 released
From: Tejun Heo
Date: Tue May 22 2012 - 13:03:27 EST
On Tue, May 22, 2012 at 06:52:49PM +0200, Jörg-Volker Peetz wrote:
> I tried the above patch but was not able to see a line beginning with "XXX", not
> on the text-console nor in any log-file. After the hard-lock, I can see only the
> console-screen which now changed slightly:
>
> BUG: Unable to handle kernel NULL pointer dereference at 0000000000000008
> IP: [<ffffffff8103ed60>] delayed_work_timer_fn+0x30/0x60
Oh, &cwq->wq is at offset 8 so cwq should have been -8. Maybe I'm
just confused. Can you please try the following instead?
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 5abf42f..14babfe 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1096,10 +1096,16 @@ queue_work_on(int cpu, struct workqueue_struct *wq, struct work_struct *work)
}
EXPORT_SYMBOL_GPL(queue_work_on);
+#include <linux/uaccess.h>
static void delayed_work_timer_fn(unsigned long __data)
{
struct delayed_work *dwork = (struct delayed_work *)__data;
struct cpu_workqueue_struct *cwq = get_work_cwq(&dwork->work);
+ unsigned long v;
+
+ if (probe_kernel_read(&v, &cwq->wq, sizeof(v)))
+ printk("XXX delayed_work_timer_fn: cwq %p, fn=%pf\n",
+ cwq, dwork->work.func);
__queue_work(smp_processor_id(), cwq->wq, &dwork->work);
}
--
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/