Re: [PATCHv3 net] xfrm: move xfrm_garbage_collect out of xfrm_policy_flush

2017-06-12 Thread Steffen Klassert
On Sun, Jun 11, 2017 at 09:44:20AM +0800, Hangbin Liu wrote: > Now we will force to do garbage collection if any policy removed in > xfrm_policy_flush(). But during xfrm_net_exit(). We call flow_cache_fini() > first and set set fc->percpu to NULL. Then after we call xfrm_policy_fini() > -> frxm_pol

Re: [PATCHv3 net] xfrm: move xfrm_garbage_collect out of xfrm_policy_flush

2017-06-11 Thread Xin Long
On Sun, Jun 11, 2017 at 9:44 AM, Hangbin Liu wrote: > Now we will force to do garbage collection if any policy removed in > xfrm_policy_flush(). But during xfrm_net_exit(). We call flow_cache_fini() > first and set set fc->percpu to NULL. Then after we call xfrm_policy_fini() > -> frxm_policy_flus

[PATCHv3 net] xfrm: move xfrm_garbage_collect out of xfrm_policy_flush

2017-06-10 Thread Hangbin Liu
Now we will force to do garbage collection if any policy removed in xfrm_policy_flush(). But during xfrm_net_exit(). We call flow_cache_fini() first and set set fc->percpu to NULL. Then after we call xfrm_policy_fini() -> frxm_policy_flush() -> flow_cache_flush(), we will get NULL pointer dereferen