Re: [Patch net] xfrm: fix reinsert in xfrm_hash_rebuild()

2019-01-04 Thread Cong Wang
On Thu, Jan 3, 2019 at 10:58 PM Florian Westphal wrote: > > Cong Wang wrote: > > xfrm_hash_rebuild() re-inserts existing policies into the hashtables, > > so it should not insert a same policy in the same place twice. This > > means we have to pass excl==1 to xfrm_policy_inexact_insert() and igno

Re: [Patch net] xfrm: fix reinsert in xfrm_hash_rebuild()

2019-01-03 Thread Florian Westphal
Cong Wang wrote: > xfrm_hash_rebuild() re-inserts existing policies into the hashtables, > so it should not insert a same policy in the same place twice. This > means we have to pass excl==1 to xfrm_policy_inexact_insert() and ignore > the -EEXIST error. Otherwise we end up having an entry in the

[Patch net] xfrm: fix reinsert in xfrm_hash_rebuild()

2019-01-03 Thread Cong Wang
xfrm_hash_rebuild() re-inserts existing policies into the hashtables, so it should not insert a same policy in the same place twice. This means we have to pass excl==1 to xfrm_policy_inexact_insert() and ignore the -EEXIST error. Otherwise we end up having an entry in the hashtable points to itself