Xin Long f31e5f1a89 netfilter: unlock xt_table earlier in __do_replace
Now it's doing cleanup_entry for oldinfo under the xt_table lock,
but it's not really necessary. After the replacement job is done
in xt_replace_table, oldinfo is not used elsewhere any more, and
it can be freed without xt_table lock safely.

The important thing is that rtnl_lock is called in some xt_target
destroy, which means rtnl_lock, a big lock is used in xt_table
lock, a smaller one. It usually could be the reason why a dead
lock may happen.

Besides, all xt_target/match checkentry is called out of xt_table
lock. It's better also to move all cleanup_entry calling out of
xt_table lock, just as do_replace_finish does for ebtables.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2018-03-05 23:15:43 +01:00
..
2018-02-27 11:01:39 -05:00
2018-02-19 14:19:09 -05:00
2018-03-04 13:04:22 -05:00
2018-02-28 11:43:28 -05:00
2017-05-21 13:42:36 -04:00
2018-03-04 13:04:22 -05:00
2018-03-01 13:13:23 -05:00
2018-03-04 13:04:22 -05:00
2018-03-01 13:13:23 -05:00
2018-02-28 11:43:28 -05:00
2018-03-04 13:04:22 -05:00
2016-12-25 17:21:23 +01:00
2018-02-19 14:19:11 -05:00
2018-02-28 11:43:28 -05:00
2018-02-19 14:19:11 -05:00
2017-09-01 18:35:23 -07:00
2018-02-27 11:01:38 -05:00
2018-02-19 14:19:10 -05:00
2018-01-16 15:01:33 -05:00
2018-02-19 14:19:11 -05:00
2018-02-28 11:43:28 -05:00