From: Dmitry Mishin <dim@openvz.org>
To: netfilter-devel@lists.netfilter.org
Cc: dev@openvz.org, devel@openvz.org
Subject: [PATCH] table->lock initialization move
Date: Mon, 17 Apr 2006 15:14:01 +0400 [thread overview]
Message-ID: <200604171514.02014.dim@openvz.org> (raw)
[-- 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;
next reply other threads:[~2006-04-17 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-17 11:14 Dmitry Mishin [this message]
2006-04-20 23:26 ` [PATCH] table->lock initialization move Patrick McHardy
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=200604171514.02014.dim@openvz.org \
--to=dim@openvz.org \
--cc=dev@openvz.org \
--cc=devel@openvz.org \
--cc=netfilter-devel@lists.netfilter.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.