linux/net/netfilter/ipvs
Simon Horman 736561a01f IPVS: Use global mutex in ip_vs_app.c
As part of the work to make IPVS network namespace aware
__ip_vs_app_mutex was replaced by a per-namespace lock,
ipvs->app_mutex. ipvs->app_key is also supplied for debugging purposes.

Unfortunately this implementation results in ipvs->app_key residing
in non-static storage which at the very least causes a lockdep warning.

This patch takes the rather heavy-handed approach of reinstating
__ip_vs_app_mutex which will cover access to the ipvs->list_head
of all network namespaces.

[   12.610000] IPVS: Creating netns size=2456 id=0
[   12.630000] IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
[   12.640000] BUG: key ffff880003bbf1a0 not in .data!
[   12.640000] ------------[ cut here ]------------
[   12.640000] WARNING: at kernel/lockdep.c:2701 lockdep_init_map+0x37b/0x570()
[   12.640000] Hardware name: Bochs
[   12.640000] Pid: 1, comm: swapper Tainted: G        W 2.6.38-kexec-06330-g69b7efe-dirty #122
[   12.650000] Call Trace:
[   12.650000]  [<ffffffff8102e685>] warn_slowpath_common+0x75/0xb0
[   12.650000]  [<ffffffff8102e6d5>] warn_slowpath_null+0x15/0x20
[   12.650000]  [<ffffffff8105967b>] lockdep_init_map+0x37b/0x570
[   12.650000]  [<ffffffff8105829d>] ? trace_hardirqs_on+0xd/0x10
[   12.650000]  [<ffffffff81055ad8>] debug_mutex_init+0x38/0x50
[   12.650000]  [<ffffffff8104bc4c>] __mutex_init+0x5c/0x70
[   12.650000]  [<ffffffff81685ee7>] __ip_vs_app_init+0x64/0x86
[   12.660000]  [<ffffffff81685a3b>] ? ip_vs_init+0x0/0xff
[   12.660000]  [<ffffffff811b1c33>] T.620+0x43/0x170
[   12.660000]  [<ffffffff811b1e9a>] ? register_pernet_subsys+0x1a/0x40
[   12.660000]  [<ffffffff81685a3b>] ? ip_vs_init+0x0/0xff
[   12.660000]  [<ffffffff81685a3b>] ? ip_vs_init+0x0/0xff
[   12.660000]  [<ffffffff811b1db7>] register_pernet_operations+0x57/0xb0
[   12.660000]  [<ffffffff81685a3b>] ? ip_vs_init+0x0/0xff
[   12.670000]  [<ffffffff811b1ea9>] register_pernet_subsys+0x29/0x40
[   12.670000]  [<ffffffff81685f19>] ip_vs_app_init+0x10/0x12
[   12.670000]  [<ffffffff81685a87>] ip_vs_init+0x4c/0xff
[   12.670000]  [<ffffffff8166562c>] do_one_initcall+0x7a/0x12e
[   12.670000]  [<ffffffff8166583e>] kernel_init+0x13e/0x1c2
[   12.670000]  [<ffffffff8128c134>] kernel_thread_helper+0x4/0x10
[   12.670000]  [<ffffffff8128ad40>] ? restore_args+0x0/0x30
[   12.680000]  [<ffffffff81665700>] ? kernel_init+0x0/0x1c2
[   12.680000]  [<ffffffff8128c130>] ? kernel_thread_helper+0x0/0x1global0

Signed-off-by: Simon Horman <horms@verge.net.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-21 20:39:24 -07:00
..
Kconfig netfilter: fix IP_VS dependencies 2010-11-18 13:14:33 -08:00
Makefile IPVS: sip persistence engine 2010-10-04 22:45:24 +09:00
ip_vs_app.c IPVS: Use global mutex in ip_vs_app.c 2011-03-21 20:39:24 -07:00
ip_vs_conn.c IPVS: Add expire_quiescent_template() 2011-03-15 09:36:58 +09:00
ip_vs_core.c IPVS: Minimise ip_vs_leave when CONFIG_SYSCTL is undefined 2011-03-15 09:37:00 +09:00
ip_vs_ctl.c ipvs: fix a typo in __ip_vs_control_init() 2011-03-21 20:39:24 -07:00
ip_vs_dh.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ip_vs_est.c ipvs: rename estimator functions 2011-03-15 09:36:54 +09:00
ip_vs_ftp.c IPVS: netns, final patch enabling network name space. 2011-01-13 10:30:29 +09:00
ip_vs_lblc.c IPVS: Conditionally define and use ip_vs_lblc{r}_table 2011-03-15 09:37:01 +09:00
ip_vs_lblcr.c IPVS: Conditionally define and use ip_vs_lblc{r}_table 2011-03-15 09:37:01 +09:00
ip_vs_lc.c ipvs: unify the formula to estimate the overhead of processing connections 2011-02-25 11:35:41 +09:00
ip_vs_nfct.c IPVS: netns, connection hash got net as param. 2011-01-13 10:30:28 +09:00
ip_vs_nq.c ipvs: make "no destination available" message more informative 2011-02-16 14:53:33 +09:00
ip_vs_pe.c IPVS: Backup, Adding Version 1 receive capability 2010-11-25 10:42:59 +09:00
ip_vs_pe_sip.c netfilter:ipvs: use kmemdup 2011-03-15 09:36:49 +09:00
ip_vs_proto.c netfilter: ipvs: fix compiler warnings 2011-01-22 13:19:36 +11:00
ip_vs_proto_ah_esp.c IPVS: netns, connection hash got net as param. 2011-01-13 10:30:28 +09:00
ip_vs_proto_sctp.c IPVS: Use correct lock in SCTP module 2011-02-03 20:45:55 +09:00
ip_vs_proto_tcp.c IPVS: netns, ip_vs_ctl local vars moved to ipvs struct. 2011-01-13 10:30:28 +09:00
ip_vs_proto_udp.c IPVS: netns, ip_vs_ctl local vars moved to ipvs struct. 2011-01-13 10:30:28 +09:00
ip_vs_rr.c ipvs: make "no destination available" message more informative 2011-02-16 14:53:33 +09:00
ip_vs_sched.c ipvs: make "no destination available" message more informative 2011-02-16 14:53:33 +09:00
ip_vs_sed.c ipvs: make "no destination available" message more informative 2011-02-16 14:53:33 +09:00
ip_vs_sh.c ipvs: make "no destination available" message more informative 2011-02-16 14:53:33 +09:00
ip_vs_sync.c IPVS: Add sysctl_sync_ver() 2011-03-15 09:36:57 +09:00
ip_vs_wlc.c ipvs: unify the formula to estimate the overhead of processing connections 2011-02-25 11:35:41 +09:00
ip_vs_wrr.c ipvs: make "no destination available" message more informative 2011-02-16 14:53:33 +09:00
ip_vs_xmit.c ipv6: Convert to use flowi6 where applicable. 2011-03-12 15:08:54 -08:00