From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] net: ipv4: fix drop handling in ip_list_rcv() and ip_list_rcv_finish() Date: Thu, 05 Jul 2018 11:26:05 +0900 (KST) Message-ID: <20180705.112605.1670394902995823182.davem@davemloft.net> References: <7b242192-a58d-a4b7-88a6-e04840e75e10@solarflare.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: ecree@solarflare.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:48400 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753009AbeGEC0K (ORCPT ); Wed, 4 Jul 2018 22:26:10 -0400 In-Reply-To: <7b242192-a58d-a4b7-88a6-e04840e75e10@solarflare.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Edward Cree Date: Wed, 4 Jul 2018 19:23:50 +0100 > Since callees (ip_rcv_core() and ip_rcv_finish_core()) might free or steal > the skb, we can't use the list_cut_before() method; we can't even do a > list_del(&skb->list) in the drop case, because skb might have already been > freed and reused. > So instead, take each skb off the source list before processing, and add it > to the sublist afterwards if it wasn't freed or stolen. > > Fixes: 5fa12739a53d net: ipv4: listify ip_rcv_finish > Fixes: 17266ee93984 net: ipv4: listified version of ip_rcv > Signed-off-by: Edward Cree Applied, thanks Edward.