Commit 91536b7a authored by Dmitry Mishin's avatar Dmitry Mishin Committed by David S. Miller
Browse files

[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: default avatarDmitry Mishin <>
Signed-off-by: default avatarKirill Korotaev <>
Signed-off-by: default avatarPatrick McHardy <>
Signed-off-by: default avatarDavid S. Miller <>
parent e4a79ef8
......@@ -529,6 +529,7 @@ int xt_register_table(struct xt_table *table,
/* Simplifies replace_table code. */
table->private = bootstrap;
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;
list_prepend(&xt[table->af].tables, table);
ret = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment