Re: [PATCH net] netfilter: unlock xt_table earlier in __do_replace

2018-03-05 Thread Pablo Neira Ayuso
On Fri, Feb 16, 2018 at 12:25:56PM +0100, Xin Long wrote: > On Fri, Feb 16, 2018 at 12:02 PM, Florian Westphal wrote: > > Xin Long wrote: [...] > >> Besides, all xt_target/match checkentry is called out of xt_table > >> lock. It's better also to move all

Re: [PATCH net] netfilter: unlock xt_table earlier in __do_replace

2018-02-16 Thread Xin Long
On Fri, Feb 16, 2018 at 12:02 PM, Florian Westphal wrote: > Xin Long wrote: >> 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

Re: [PATCH net] netfilter: unlock xt_table earlier in __do_replace

2018-02-16 Thread Florian Westphal
Xin Long wrote: > 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. Right.

[PATCH net] netfilter: unlock xt_table earlier in __do_replace

2018-02-16 Thread Xin Long
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