aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-02-03 14:47:15 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-02-03 15:48:09 -0500
commit5a4ac43509137bdcffdd9c61df7686e6e20517a3 (patch)
treeed5bc3ffb39ec55598d1a0ff9d8efe0f3573854c
parenta2c9ab80a94d9ad6e506d2f89b2191a45706245a (diff)
TRACE: fix GFP_KERNEL in rb_alloc_buf with interrupt disabled
kfifo_alloc is called from rb_alloc_buf with interrupt disabled. Use GFP_ATOMIC instead of GFP_KERNEL. Fixes following warning: [ 33.596013] WARNING: at kernel/lockdep.c:2465 lockdep_trace_alloc+0xa7/0xe0() [ 33.596013] Hardware name: [ 33.596013] Modules linked in: [ 33.596013] Pid: 1454, comm: cat Not tainted 2.6.32-litmus2010 #38 [ 33.596013] Call Trace: [ 33.596013] [<ffffffff810737ff>] ? save_trace+0x3f/0xd0 [ 33.596013] [<ffffffff81074ae7>] ? lockdep_trace_alloc+0xa7/0xe0 [ 33.596013] [<ffffffff81044290>] warn_slowpath_common+0x80/0xd0 [ 33.596013] [<ffffffff810442f4>] warn_slowpath_null+0x14/0x20 [ 33.596013] [<ffffffff81074ae7>] lockdep_trace_alloc+0xa7/0xe0 [ 33.596013] [<ffffffff810b5ed3>] __alloc_pages_nodemask+0xa3/0x710 [ 33.596013] [<ffffffff81074a1c>] ? mark_held_locks+0x6c/0x90 [ 33.596013] [<ffffffff81487585>] ? mutex_lock_nested+0x315/0x3a0 [ 33.596013] [<ffffffff81074d15>] ? trace_hardirqs_on_caller+0x145/0x190 [ 33.596013] [<ffffffff810b655d>] __get_free_pages+0x1d/0x60 [ 33.596013] [<ffffffff810e533f>] __kmalloc+0x1af/0x240 [ 33.596013] [<ffffffff81063e16>] kfifo_alloc+0x66/0xe0 [ 33.596013] [<ffffffff81222da4>] rb_alloc_buf+0x34/0x80 [ 33.596013] [<ffffffff81222e40>] log_open+0x50/0xb0 [ 33.596013] [<ffffffff810ee46a>] chrdev_open+0x1ba/0x2d0 [ 33.596013] [<ffffffff81488a95>] ? _spin_unlock+0x35/0x60 [ 33.596013] [<ffffffff810e8c21>] __dentry_open+0x1b1/0x3f0 [ 33.596013] [<ffffffff810ee2b0>] ? chrdev_open+0x0/0x2d0 [ 33.596013] [<ffffffff810e8f77>] nameidata_to_filp+0x57/0x70 [ 33.596013] [<ffffffff810f904a>] do_filp_open+0x73a/0xb20 [ 33.596013] [<ffffffff811042b1>] ? alloc_fd+0x131/0x160 [ 33.596013] [<ffffffff810e8973>] do_sys_open+0x83/0x110 [ 33.596013] [<ffffffff810e8a40>] sys_open+0x20/0x30 [ 33.596013] [<ffffffff8100b46b>] system_call_fastpath+0x16/0x1b [ 33.596013] ---[ end trace dbd83780c3496912 ]--- Signed-off-by: Andrea Bastoni <bastoni@cs.unc.edu>
-rw-r--r--litmus/sched_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/litmus/sched_trace.c b/litmus/sched_trace.c
index fcf6f44b0899..55c3dc23b3ef 100644
--- a/litmus/sched_trace.c
+++ b/litmus/sched_trace.c
@@ -64,7 +64,7 @@ int rb_alloc_buf(ring_buffer_t* buf, unsigned int size)
64 64
65 write_lock_irqsave(&buf->del_lock, flags); 65 write_lock_irqsave(&buf->del_lock, flags);
66 66
67 buf->kfifo = kfifo_alloc(size, GFP_KERNEL, NULL); 67 buf->kfifo = kfifo_alloc(size, GFP_ATOMIC, NULL);
68 68
69 write_unlock_irqrestore(&buf->del_lock, flags); 69 write_unlock_irqrestore(&buf->del_lock, flags);
70 70