* [PATCH] table->lock initialization move
@ 2006-04-17 11:14 Dmitry Mishin
2006-04-20 23:26 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Mishin @ 2006-04-17 11:14 UTC (permalink / raw)
To: netfilter-devel; +Cc: dev, devel
[-- Attachment #1: Type: text/plain, Size: 291 bytes --]
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>
--
Thanks,
Dmitry.
[-- Attachment #2: diff-net-netfilter-xt-lock-20060417 --]
[-- Type: text/plain, Size: 622 bytes --]
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 00cf0a4..17abf60 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -529,6 +529,7 @@ int xt_register_table(struct xt_table *t
/* 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 *t
/* save number of initial entries */
private->initial_entries = private->number;
- rwlock_init(&table->lock);
list_prepend(&xt[table->af].tables, table);
ret = 0;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] table->lock initialization move
2006-04-17 11:14 [PATCH] table->lock initialization move Dmitry Mishin
@ 2006-04-20 23:26 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2006-04-20 23:26 UTC (permalink / raw)
To: Dmitry Mishin; +Cc: dev, netfilter-devel, devel
Dmitry Mishin wrote:
> 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.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-20 23:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-17 11:14 [PATCH] table->lock initialization move Dmitry Mishin
2006-04-20 23:26 ` Patrick McHardy
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.