All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: WARNING: possible recursive locking detected on linux-next
Date: Thu, 18 May 2017 15:16:51 +0200	[thread overview]
Message-ID: <20170518131651.GA5148@Red> (raw)

Hello

Since linux-next-20170516 I got the following warning trace:
[    4.310450] nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>

[    4.321211] ============================================
[    4.326516] WARNING: possible recursive locking detected
[    4.331823] 4.12.0-rc1-next-20170518+ #274 Not tainted
[    4.336954] --------------------------------------------
[    4.342258] swapper/0/1 is trying to acquire lock:
[    4.347043]  (cpu_hotplug_lock.rw_sem){++++++}, at: [<c01ccb28>] stop_machine+0x1c/0x3c
[    4.355060] 
               but task is already holding lock:
[    4.360886]  (cpu_hotplug_lock.rw_sem){++++++}, at: [<c01f46c4>] static_key_slow_inc+0x14/0x24
[    4.369501] 
               other info that might help us debug this:
[    4.376021]  Possible unsafe locking scenario:

[    4.381933]        CPU0
[    4.384368]        ----
[    4.386812]   lock(cpu_hotplug_lock.rw_sem);
[    4.391082]   lock(cpu_hotplug_lock.rw_sem);
[    4.395352] 
                *** DEADLOCK ***

[    4.401265]  May be due to missing lock nesting notation

[    4.408046] 5 locks held by swapper/0/1:
[    4.411962]  #0:  (net_mutex){+.+.+.}, at: [<c05d4c08>] register_pernet_subsys+0x28/0x48
[    4.420063]  #1:  (register_ipv4_hooks){+.+.+.}, at: [<c06a4954>] ipv4_hooks_register+0xdc/0x1e0
[    4.428856]  #2:  (defrag4_mutex){+.+.+.}, at: [<c06a5648>] nf_defrag_ipv4_enable+0x48/0x8c
[    4.437213]  #3:  (cpu_hotplug_lock.rw_sem){++++++}, at: [<c01f46c4>] static_key_slow_inc+0x14/0x24
[    4.446261]  #4:  (jump_label_mutex){+.+...}, at: [<c01f463c>] __static_key_slow_inc+0x78/0xec
[    4.454877] 
               stack backtrace:
[    4.459234] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc1-next-20170518+ #274
[    4.466965] Hardware name: Allwinner sun8i Family
[    4.471664] Backtrace: 
[    4.474121] [<c010c6d8>] (dump_backtrace) from [<c010c9b0>] (show_stack+0x18/0x1c)
[    4.481684]  r7:c0c2dbd0 r6:00000000 r5:60000093 r4:c0c2dbd0
[    4.487343] [<c010c998>] (show_stack) from [<c03e86fc>] (dump_stack+0xac/0xd8)
[    4.494564] [<c03e8650>] (dump_stack) from [<c017640c>] (__lock_acquire+0xbc0/0x19f0)
[    4.502389]  r10:ef05b200 r9:c0d8775c r8:00000000 r7:c0c2dcc0 r6:00000000 r5:c14804c0
[    4.510210]  r4:c0d8775c r3:00000000
[    4.513788] [<c017584c>] (__lock_acquire) from [<c0177a00>] (lock_acquire+0x74/0x90)
[    4.521526]  r10:c0b37858 r9:c0c55348 r8:00000001 r7:00000001 r6:60000013 r5:00000000
[    4.529344]  r4:ffffe000
[    4.531883] [<c017798c>] (lock_acquire) from [<c0125500>] (get_online_cpus+0x58/0xe0)
[    4.539706]  r8:c0959750 r7:c01ccb28 r6:c0c18ff4 r5:00000000 r4:c0c19644
[    4.546404] [<c01254a8>] (get_online_cpus) from [<c01ccb28>] (stop_machine+0x1c/0x3c)
[    4.554226]  r7:c09bd960 r6:00000000 r5:ef04dce8 r4:c010f964
[    4.559885] [<c01ccb0c>] (stop_machine) from [<c010f9b0>] (patch_text+0x2c/0x34)
[    4.567273]  r7:c09bd960 r6:c14989d4 r5:c0c58b64 r4:c06ae18c
[    4.572932] [<c010f984>] (patch_text) from [<c010f79c>] (arch_jump_label_transform+0x28/0x44)
[    4.581450] [<c010f774>] (arch_jump_label_transform) from [<c01f3bf8>] (__jump_label_update+0x94/0x9c)
[    4.590745]  r5:c0c58b64 r4:c0c58a68
[    4.594322] [<c01f3b64>] (__jump_label_update) from [<c01f42ec>] (jump_label_update+0x94/0x130)
[    4.603011]  r7:c09bd960 r6:eea28f80 r5:c14989d4 r4:c0c58b64
[    4.608668] [<c01f4258>] (jump_label_update) from [<c01f469c>] (__static_key_slow_inc+0xd8/0xec)
[    4.617444]  r7:c09bd960 r6:eea28f80 r5:c0c57964 r4:c14989d4
[    4.623101] [<c01f45c4>] (__static_key_slow_inc) from [<c01f46cc>] (static_key_slow_inc+0x1c/0x24)
[    4.632047]  r5:c0c57964 r4:c14989d4
[    4.635628] [<c01f46b0>] (static_key_slow_inc) from [<c061763c>] (nf_register_net_hook+0x148/0x1a8)
[    4.644662]  r5:c0c57964 r4:c0c501c0
[    4.648242] [<c06174f4>] (nf_register_net_hook) from [<c0617f90>] (nf_register_net_hooks+0x40/0x78)
[    4.657279]  r9:c0c55348 r8:00000002 r7:c0c4fd00 r6:c0c57b15 r5:00000000 r4:c0c55348
[    4.665019] [<c0617f50>] (nf_register_net_hooks) from [<c06a5674>] (nf_defrag_ipv4_enable+0x74/0x8c)
[    4.674143]  r9:c0c578ae r8:00000009 r7:00000009 r6:c0c57b15 r5:c0c4fd00 r4:00000000
[    4.681883] [<c06a5600>] (nf_defrag_ipv4_enable) from [<c06a4a1c>] (ipv4_hooks_register+0x1a4/0x1e0)
[    4.691003]  r5:c0c4fd00 r4:eea280c0
[    4.694584] [<c06a4878>] (ipv4_hooks_register) from [<c06241c8>] (nf_ct_l3proto_pernet_register+0x30/0x3c)
[    4.704226]  r7:ef0dc980 r6:c0c4fd00 r5:c0c4fd00 r4:00000000
[    4.709886] [<c0624198>] (nf_ct_l3proto_pernet_register) from [<c06a4ea8>] (ipv4_net_init+0x30/0x68)
[    4.719012] [<c06a4e78>] (ipv4_net_init) from [<c05d420c>] (ops_init+0x104/0x16c)
[    4.726486]  r5:eea280c0 r4:c0c552a0
[    4.730065] [<c05d4108>] (ops_init) from [<c05d4b3c>] (register_pernet_operations+0x108/0x1ac)
[    4.738670]  r9:c0c43cbc r8:ef04de70 r7:c0c4fcd0 r6:c0c552a0 r5:00000000 r4:c0c4fd00
[    4.746409] [<c05d4a34>] (register_pernet_operations) from [<c05d4c14>] (register_pernet_subsys+0x34/0x48)
[    4.756054]  r9:00000000 r8:c0c60780 r7:c0b37850 r6:c0c552a0 r5:c0c4fc44 r4:c0c4fc40
[    4.763797] [<c05d4be0>] (register_pernet_subsys) from [<c0b2cf5c>] (nf_conntrack_l3proto_ipv4_init+0x38/0xb4)
[    4.773786]  r7:c0b37850 r6:ffffe000 r5:c0b2cf24 r4:00000000
[    4.779447] [<c0b2cf24>] (nf_conntrack_l3proto_ipv4_init) from [<c0101954>] (do_one_initcall+0x5c/0x198)
[    4.788913]  r5:c0b2cf24 r4:c0c0f4cc
[    4.792494] [<c01018f8>] (do_one_initcall) from [<c0b00ff0>] (kernel_init_freeable+0x254/0x2e8)
[    4.801185]  r9:00000007 r8:c0c60780 r7:c0b37850 r6:c0c60780 r5:c0b48060 r4:c09ff22c
[    4.808926] [<c0b00d9c>] (kernel_init_freeable) from [<c070caf0>] (kernel_init+0x10/0x118)
[    4.817184]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c070cae0
[    4.825001]  r4:00000000
[    4.827542] [<c070cae0>] (kernel_init) from [<c0107f70>] (ret_from_fork+0x14/0x24)
[    4.835102]  r5:c070cae0 r4:00000000

But the same kernel config without netfilter got:
[   11.748845] ============================================
[   11.754151] WARNING: possible recursive locking detected
[   11.759460] 4.12.0-rc1-next-20170518+ #278 Not tainted
[   11.764591] --------------------------------------------
[   11.769897] mount/459 is trying to acquire lock:
[   11.774510]  (cpu_hotplug_lock.rw_sem){++++++}, at: [<c01ccb28>] stop_machine+0x1c/0x3c
[   11.782527] 
               but task is already holding lock:
[   11.788352]  (cpu_hotplug_lock.rw_sem){++++++}, at: [<c01f445c>] static_key_slow_dec+0x28/0x64
[   11.796968] 
               other info that might help us debug this:
[   11.803488]  Possible unsafe locking scenario:

[   11.809400]        CPU0
[   11.811844]        ----
[   11.814287]   lock(cpu_hotplug_lock.rw_sem);
[   11.818557]   lock(cpu_hotplug_lock.rw_sem);
[   11.822827] 
                *** DEADLOCK ***

[   11.828741]  May be due to missing lock nesting notation

[   11.835522] 3 locks held by mount/459:
[   11.839266]  #0:  (cgroup_mutex){+.+.+.}, at: [<c01bdf30>] cgroup_lock_and_drain_offline+0x38/0x318
[   11.848318]  #1:  (cpu_hotplug_lock.rw_sem){++++++}, at: [<c01f445c>] static_key_slow_dec+0x28/0x64
[   11.857367]  #2:  (jump_label_mutex){+.+...}, at: [<c01f43a8>] __static_key_slow_dec+0x20/0xac
[   11.865983] 
               stack backtrace:
[   11.870341] CPU: 3 PID: 459 Comm: mount Not tainted 4.12.0-rc1-next-20170518+ #278
[   11.877899] Hardware name: Allwinner sun8i Family
[   11.882596] Backtrace: 
[   11.885054] [<c010c6d8>] (dump_backtrace) from [<c010c9b0>] (show_stack+0x18/0x1c)
[   11.892618]  r7:c0a24f50 r6:00000000 r5:600f0093 r4:c0a24f50
[   11.898277] [<c010c998>] (show_stack) from [<c03e86fc>] (dump_stack+0xac/0xd8)
[   11.905499] [<c03e8650>] (dump_stack) from [<c017640c>] (__lock_acquire+0xbc0/0x19f0)
[   11.913324]  r10:eebe4b00 r9:c0b7d61c r8:00000000 r7:c0a25040 r6:00000000 r5:c1276380
[   11.921143]  r4:c0b7d61c r3:00000000
[   11.924721] [<c017584c>] (__lock_acquire) from [<c0177a00>] (lock_acquire+0x74/0x90)
[   11.932458]  r10:c1266c28 r9:c1266c28 r8:00000001 r7:00000001 r6:600f0013 r5:00000000
[   11.940277]  r4:ffffe000
[   11.942817] [<c017798c>] (lock_acquire) from [<c0125500>] (get_online_cpus+0x58/0xe0)
[   11.950640]  r8:0000003c r7:c01ccb28 r6:c0a10374 r5:00000000 r4:c0a109c4
[   11.957337] [<c01254a8>] (get_online_cpus) from [<c01ccb28>] (stop_machine+0x1c/0x3c)
[   11.965160]  r7:c12658c4 r6:00000000 r5:eeb85ca0 r4:c010f964
[   11.970819] [<c01ccb0c>] (stop_machine) from [<c010f9b0>] (patch_text+0x2c/0x34)
[   11.978208]  r7:c12658c4 r6:c0a16b14 r5:c0a4eff8 r4:c01c6f38
[   11.983867] [<c010f984>] (patch_text) from [<c010f79c>] (arch_jump_label_transform+0x28/0x44)
[   11.992387] [<c010f774>] (arch_jump_label_transform) from [<c01f3bf8>] (__jump_label_update+0x94/0x9c)
[   12.001681]  r5:c0a4eff8 r4:c0a4ebf0
[   12.005259] [<c01f3b64>] (__jump_label_update) from [<c01f42ec>] (jump_label_update+0x94/0x130)
[   12.013948]  r7:c12658c4 r6:00000000 r5:c0a16b14 r4:c0a4eff8
[   12.019606] [<c01f4258>] (jump_label_update) from [<c01f43ec>] (__static_key_slow_dec+0x64/0xac)
[   12.028382]  r7:c12658c4 r6:00000000 r5:00000000 r4:c0a16b14
[   12.034040] [<c01f4388>] (__static_key_slow_dec) from [<c01f446c>] (static_key_slow_dec+0x38/0x64)
[   12.042990]  r7:c12658c4 r6:c0a17458 r5:eeaa6000 r4:c0a16b14
[   12.048647] [<c01f4434>] (static_key_slow_dec) from [<c01f44cc>] (static_key_disable+0x34/0x68)
[   12.057335]  r5:eeaa6000 r4:c0a16b14
[   12.060913] [<c01f4498>] (static_key_disable) from [<c01bdb54>] (rebind_subsystems+0x320/0x3fc)
[   12.069601]  r5:eeaa6000 r4:eeaa6010
[   12.073179] [<c01bd834>] (rebind_subsystems) from [<c01bdd84>] (cgroup_setup_root+0x154/0x2c8)
[   12.081784]  r10:c0a164e0 r9:eeaa6018 r8:c0a16a94 r7:00000000 r6:eeaa6000 r5:eeb85dd0
[   12.089603]  r4:eeaa6010
[   12.092140] [<c01bdc30>] (cgroup_setup_root) from [<c01c2f54>] (cgroup1_mount+0x62c/0x848)
[   12.100398]  r10:c0a1661c r9:00000001 r8:c0a16aac r7:00000000 r6:c12657f0 r5:eeaa6000
[   12.108216]  r4:c0a16904
[   12.110755] [<c01c2928>] (cgroup1_mount) from [<c01bc4bc>] (cgroup_mount+0xc8/0x430)
[   12.118492]  r10:00000000 r9:ef238000 r8:c0a16a30 r7:c0a169b0 r6:c0a16a30 r5:eea7a880
[   12.126311]  r4:c0a07584
[   12.128851] [<c01bc3f4>] (cgroup_mount) from [<c024e6a0>] (mount_fs+0x1c/0xac)
[   12.136069]  r10:00000000 r9:ef238000 r8:c0a16a30 r7:c0273b70 r6:c0a16a30 r5:eea7a880
[   12.143887]  r4:c01bc3f4
[   12.146427] [<c024e684>] (mount_fs) from [<c026ff04>] (vfs_kern_mount+0x5c/0x130)
[   12.153903]  r6:00000000 r5:eea7a880 r4:eea42700
[   12.158522] [<c026fea8>] (vfs_kern_mount) from [<c0273b70>] (do_mount+0x164/0xc98)
[   12.166086]  r9:eea7a2c0 r8:c0274a50 r7:eea7a880 r6:00000027 r5:ef238000 r4:c0a16a30
[   12.173822] [<c0273a0c>] (do_mount) from [<c0274a50>] (SyS_mount+0x94/0xbc)
[   12.180781]  r10:00000000 r9:eeb84000 r8:c0ed000e r7:010ec1b0 r6:ef238000 r5:eea7a2c0
[   12.188599]  r4:eea7a880
[   12.191139] [<c02749bc>] (SyS_mount) from [<c0107ee0>] (ret_fast_syscall+0x0/0x1c)
[   12.198703]  r8:c0108084 r7:00000015 r6:010ec1a0 r5:00000000 r4:010ec170

Regards

                 reply	other threads:[~2017-05-18 13:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170518131651.GA5148@Red \
    --to=clabbe.montjoie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.