Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp125729pxb; Thu, 12 Aug 2021 12:21:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqXrVTvYm/GPI8a4/zzYOf4ZEM+wopnodsgNFXiyKiFKYQvxomyfjx/HOVTjPy2rP5xGQ+ X-Received: by 2002:aa7:d511:: with SMTP id y17mr7412024edq.341.1628796086955; Thu, 12 Aug 2021 12:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628796086; cv=none; d=google.com; s=arc-20160816; b=lTD6lg50gbQ3FTIYe4ODWjleC8iTUzqY/iLZWaFlmxznMjqpfEghUD4spt63oC+34P iTgxkJYW5QD/1T1F98apN8jWYE/Vn4LXeAhDdEklBH/9oihgmlR42kA9qm4bEfgzKIJa Bb8WQuJkdz/F6115hiSKRnoY5mMkeHjRCFqwf4E52Xr2Z/XUl/TBiw3hhPmlZRAHoHRy Y+TVm3OTASs9d8Tyi7I0UJ1iqv3hZ/bozvKZXp4ty6sURGN9tnBVNoAN9EGyks8IJQp8 IVh5MqgqnUnpsN85XTnZQLQWj/2Hd6lms0ynbNvwqngDRUyW2yUdXWSS2uzHdXkRHnbC Ga+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Swd4Qb0LB2gTSkGGkD/oyA9lgEK689TaeHzpVlWAOxs=; b=cvHeTG2OyRHeS8O9LVz4kHCyHi5s8zgkUaFqaGxeCFjo9vmNhBZHZ/0vd+BU3EftAr JIEE+3oJGIo7L11lvykJB8VOW9LJda31IwRaNZyZ6dDxipriLR/v/eniKVkU4uj0mh3s GM6WcosxPrmI8RSwoxoBkEzdloSHf4oh+5ROSJx+yqu34t+qq3+sxx+upTbeoAQGygIw LdjxxCDPnuk4eCCzisj7KFSxSf3FDJvI/CUMN314Z2ca/nfZtQ5h0Ls8aavZcPzdBPnb BPeWJeN4Lw5g0nnHPAam/30KsgLAifv7A/fjEigpYhY56w8EeR7pDwamS6DJdJDCLjDl cqmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R3GMMo6D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p3si1535222ejx.509.2021.08.12.12.21.02; Thu, 12 Aug 2021 12:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R3GMMo6D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233143AbhHLTR6 (ORCPT + 99 others); Thu, 12 Aug 2021 15:17:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbhHLTRv (ORCPT ); Thu, 12 Aug 2021 15:17:51 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93924C061756; Thu, 12 Aug 2021 12:17:25 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id w13-20020a17090aea0db029017897a5f7bcso12334261pjy.5; Thu, 12 Aug 2021 12:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Swd4Qb0LB2gTSkGGkD/oyA9lgEK689TaeHzpVlWAOxs=; b=R3GMMo6DOaRMP1S/Sg8zqd2DyQ7n28u+R11cM1SCrFSkKO9S35XvkiVGoNXWxuA018 HACPnb/yyQleUMjJeyyMWFpOa9TSSYQAIFgkSBoYFU4fiIhyaSVapMs/YL8FH/3g6Y6p RcfxdsZUZAXYJxVUHU3o5+y0laSFE7L5kGer00ByYRhZTgcQ8mvyuJ9GMGtgsf9l25aF J7DxtDYSEXONUCijrmatj6rzA+YltW6Ag9gOJFYBBwaO5V8EOqr9TjxhLdW1AsF1QMSq cYyGgNJBIuXaCNdfEJW0JY1bjhBav0HrxbErGvYDHe7Q5TevYjIneaYcWIqD+ack2o7I gjOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Swd4Qb0LB2gTSkGGkD/oyA9lgEK689TaeHzpVlWAOxs=; b=SGkfMSUtNXQ17w1uNz1MEMJyTG2lhiP4CY1TlKHXYq+v/OXT+rNbpwbmdHe0BIqDaR owuYfURrV5r//ESbmCTmL+PNKIxhqr7L82kmothrq98KDtG+xvExNyQrSdroDJVTfohM kvM3ZI97yz+YBvGP/pdmgAXWtkfpohFRS8NEiA10/vgazFfNYs6gWfa0hIkUnenREj9b jgxG3U+98iyL+xv8sU7BtVFz7Dqt+YVYvYCUqMi+yYeKG66Vex3wjPoNeRUORyxcCOME ceNp/W8V6g+/x5fcMA3RVGSg0s8aYlEVg+L1AmpzCDGYeiKd1c8qA/FO5jN106BZ42CJ ql9w== X-Gm-Message-State: AOAM530M/rIzofN9sfdEvNNgPaJsX9WQljd6acQrj+dOIDTebUBhUoHa kCaGm+f0/Ne3cAc7BxzpIw0= X-Received: by 2002:a17:90a:2fc2:: with SMTP id n2mr5503399pjm.112.1628795845101; Thu, 12 Aug 2021 12:17:25 -0700 (PDT) Received: from [192.168.1.38] (bb42-60-144-185.singnet.com.sg. [42.60.144.185]) by smtp.gmail.com with ESMTPSA id c23sm4873686pgb.74.2021.08.12.12.17.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Aug 2021 12:17:24 -0700 (PDT) Subject: Re: [PATCH] net: drop skbs in napi->rx_list when removing the napi context. To: Eric Dumazet Cc: David Miller , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , kpsingh@kernel.org, Antoine Tenart , Alexander Lobakin , Wei Wang , Taehee Yoo , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , memxor@gmail.com, netdev , LKML , bpf , linux-kernel-mentees@lists.linuxfoundation.org, syzbot+989efe781c74de1ddb54@syzkaller.appspotmail.com References: <20210811235959.1099333-1-phind.uet@gmail.com> From: Phi Nguyen Message-ID: <663ac8c4-b0c3-5af6-c3c3-f371e0410a43@gmail.com> Date: Fri, 13 Aug 2021 03:17:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/12/2021 3:07 PM, Eric Dumazet wrote: > Also I object to this fix. > > If packets have been stored temporarily in GRO, they should be > released at some point, > normally at the end of a napi poll. > > By released, I mean that these packets should reach the upper stack, > instead of being dropped without > any notification. > > It seems a call to gro_normal_list() is missing somewhere. > > Can you find where ? > > Thanks ! > H Eric, I think the location that should have a call to gro_normal_list() is __netif_napi_del(). Let say, if the driver call a function that lead to gro_normal_one(), and add a skb to the rx_list while the napi poll is not scheduled, and the driver remove the napi context before a napi poll could be triggered, then the added skb will be lost. Actually, this was the first solution that I tried with syzbot (It passed the test too). Best regards, Phi