On Fri, Jun 9, 2017 at 4:32 PM, Steffen Klassert <steffen.klass...@secunet.com> wrote: > On Fri, Jun 09, 2017 at 04:23:01PM +0800, Hangbin Liu wrote: >> Hi Steffen, >> >> BTW, If we put the check in xfrm_policy_flush(), we can prevent it earlier. >> But If we put the check in flow_cache_percpu_empty(), we can prevent >> other functions set fc->percpu to NULL, although not much possible : ) >> >> So I'm not quite sure whether we should put the check in >> flow_cache_percpu_empty() or in xfrm_policy_flush(). > > Can't we just call xfrm_policy_fini() first and then flow_cache_fini()? > That would be a better fix. seems safe as what flow_cache_fini does is only to free fcp->hash_table and stop timer, I didn't see it has any dependence on xfrm_policy stuff.
- [PATCH net] net/flow: fix fc->percpu NULL pointer dere... Hangbin Liu
- Re: [PATCH net] net/flow: fix fc->percpu NULL poi... Hangbin Liu
- Re: [PATCH net] net/flow: fix fc->percpu NULL... Steffen Klassert
- Re: [PATCH net] net/flow: fix fc->percpu ... Xin Long
- Re: [PATCH net] net/flow: fix fc->per... Hangbin Liu
- Re: [PATCH net] net/flow: fix fc-&g... Xin Long
- Re: [PATCH net] net/flow: fix f... Hangbin Liu
- Re: [PATCH net] net/flow: f... Hangbin Liu
- [PATCHv2 net] net/flow: fix fc->percpu NULL point... Hangbin Liu
- Re: [PATCHv2 net] net/flow: fix fc->percpu NU... Xin Long
- Re: [PATCHv2 net] net/flow: fix fc->percp... Hangbin Liu
- [PATCHv3 net] xfrm: move xfrm_garbage_collect ou... Hangbin Liu
- Re: [PATCHv3 net] xfrm: move xfrm_garbage_co... Xin Long
- Re: [PATCHv3 net] xfrm: move xfrm_garbage_co... Steffen Klassert