From: Florian Westphal Subject: Re: [PATCH ipsec 7/7] xfrm: policy: fix infinite loop when merging src-nodes Date: Sat, 5 Jan 2019 10:59:08 +0100 Message-ID: <20190105095908.fi277jtuwketsfxi@breakpoint.cc> References: <20190104131705.9550-1-fw@strlen.de> <20190104131705.9550-8-fw@strlen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Westphal , Steffen Klassert , Linux Kernel Network Developers To: Cong Wang Return-path: Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:55574 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726141AbfAEJ7M (ORCPT ); Sat, 5 Jan 2019 04:59:12 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Cong Wang wrote: > > - hlist_for_each_entry(tmp, &node->hhead, bydst) > > - tmp->bydst_reinsert = true; > > - hlist_for_each_entry(tmp, &n->hhead, bydst) > > + hlist_for_each_entry(tmp, &n->hhead, bydst) { > > > hlist_for_each_entry_safe()? Could be used instead indeed, but its not required. Steffen, just let me know your preference. If you think that hlist_for_each_entry(...) hlist_del_rcu(&tmp->bydst); ... looks unsafe then i can respin this with _safe version.