summaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2018-02-16 18:04:56 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-05 23:15:43 +0100
commitf31e5f1a891f989f107e8caa6b49dd4df0e12265 (patch)
tree100f02b6a29e79f58e0b6ffa415b5f0e4d1647b4 /net/netfilter
parent2db3fec507bd822ed81c031221b97701238949dc (diff)
downloadlinux-f31e5f1a891f989f107e8caa6b49dd4df0e12265.tar.gz
linux-f31e5f1a891f989f107e8caa6b49dd4df0e12265.tar.bz2
linux-f31e5f1a891f989f107e8caa6b49dd4df0e12265.zip
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>
Diffstat (limited to 'net/netfilter')
0 files changed, 0 insertions, 0 deletions