Thread (13 messages) 13 messages, 6 authors, 2012-07-10

WARNING: __GFP_FS allocations with IRQs disabled (kmemcheck_alloc_shadow)

From: Fengguang Wu <hidden>
Date: 2012-07-08 04:00:22
Also in: lkml

Hi Vegard,

This warning code is triggered for the attached config:

__lockdep_trace_alloc():
        /*
         * Oi! Can't be having __GFP_FS allocations with IRQs disabled.
         */
        if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)))
                return;

Where the irq is possibly disabled at the beginning of __slab_alloc():

        local_irq_save(flags);

Thanks,
Fengguang
---

[    1.657564] kmemcheck: Limiting number of CPUs to 1.
[    1.660022] kmemcheck: Initialized
[    1.682729] ------------[ cut here ]------------
[    1.687281] WARNING: at /c/kernel-tests/net/kernel/lockdep.c:2739 lockdep_trace_alloc+0x14e/0x1c0()
[    1.690000] Hardware name: Bochs
[    1.690000] Pid: 1, comm: swapper/0 Not tainted 3.5.0-rc5+ #11
[    1.690000] Call Trace:
[    1.690000]  [<ffffffff81055521>] warn_slowpath_common+0xd1/0x110
[    1.690000]  [<ffffffff81043685>] ? kmemcheck_fault+0x105/0x130
[    1.690000]  [<ffffffff81055685>] warn_slowpath_null+0x25/0x30
[    1.690000]  [<ffffffff810c852e>] lockdep_trace_alloc+0x14e/0x1c0
[    1.690000]  [<ffffffff8112e9ec>] __alloc_pages_nodemask+0xbc/0xcb0
[    1.690000]  [<ffffffff8112eb89>] ? __alloc_pages_nodemask+0x259/0xcb0
[    1.690000]  [<ffffffff813a2dfd>] ? trace_hardirqs_off_thunk+0x3a/0x3c
[    1.690000]  [<ffffffff813a2dfd>] ? trace_hardirqs_off_thunk+0x3a/0x3c
[    1.690000]  [<ffffffff818a8ef0>] ? error_exit+0x30/0xb0
[    1.690000]  [<ffffffff8117e9b1>] kmemcheck_alloc_shadow+0x31/0x160
[    1.690000]  [<ffffffff8117b1ec>] new_slab+0x1fc/0x460
[    1.690000]  [<ffffffff81898065>] __slab_alloc.isra.49.constprop.54+0x585/0x791
[    1.690000]  [<ffffffff813918ff>] ? idr_pre_get+0x5f/0xd0
[    1.690000]  [<ffffffff818a8ef0>] ? error_exit+0x30/0xb0
[    1.690000]  [<ffffffff813918ff>] ? idr_pre_get+0x5f/0xd0
[    1.690000]  [<ffffffff8117b63b>] kmem_cache_alloc+0xab/0x1b0
[    1.690000]  [<ffffffff813918ff>] idr_pre_get+0x5f/0xd0
[    1.690000]  [<ffffffff81392413>] ida_pre_get+0x23/0xf0
[    1.690000]  [<ffffffff810786e5>] create_worker+0x65/0x220
[    1.690000]  [<ffffffff8236202f>] init_workqueues+0x296/0x4fc
[    1.690000]  [<ffffffff82361d99>] ? usermodehelper_init+0x52/0x52
[    1.690000]  [<ffffffff823452ee>] do_one_initcall+0xb6/0x1d4
[    1.690000]  [<ffffffff823454e6>] kernel_init+0xda/0x309
[    1.690000]  [<ffffffff818aa4f4>] kernel_thread_helper+0x4/0x10
[    1.690000]  [<ffffffff818a8a34>] ? retint_restore_args+0x13/0x13
[    1.690000]  [<ffffffff8234540c>] ? do_one_initcall+0x1d4/0x1d4
[    1.690000]  [<ffffffff818aa4f0>] ? gs_change+0x13/0x13
[    1.690000] ---[ end trace 4eaa2a86a8e2da22 ]---
[    1.776302] Brought up 1 CPUs

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help