diff options
author | Dmitry Mishin <dim@openvz.org> | 2006-04-24 17:18:25 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-04-24 17:27:33 -0700 |
commit | 91536b7ae67710ca888e03ea82c60f0ac073a015 (patch) | |
tree | 84d7cae64287878e9dbfff5ec04e306e50982328 /net | |
parent | e4a79ef811505a8bf8d8edfda8602e23cb2fbdb0 (diff) | |
download | linux-3.10-91536b7ae67710ca888e03ea82c60f0ac073a015.tar.gz linux-3.10-91536b7ae67710ca888e03ea82c60f0ac073a015.tar.bz2 linux-3.10-91536b7ae67710ca888e03ea82c60f0ac073a015.zip |
[NETFILTER]: x_tables: move table->lock initialization
xt_table->lock should be initialized before xt_replace_table() call, which
uses it. This patch removes strict requirement that table should define
lock before registering.
Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/x_tables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 00cf0a4f4d9..17abf60f957 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -529,6 +529,7 @@ int xt_register_table(struct xt_table *table, /* Simplifies replace_table code. */ table->private = bootstrap; + rwlock_init(&table->lock); if (!xt_replace_table(table, 0, newinfo, &ret)) goto unlock; @@ -538,7 +539,6 @@ int xt_register_table(struct xt_table *table, /* save number of initial entries */ private->initial_entries = private->number; - rwlock_init(&table->lock); list_prepend(&xt[table->af].tables, table); ret = 0; |