Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1359935ybz; Fri, 1 May 2020 21:16:38 -0700 (PDT) X-Google-Smtp-Source: APiQypIAzQCgl7Mg/5MMDyXX99naBXxhmfrFviMVb7PHoKBmT9l1rZBGDGZzlO7IXRECNU/t/JD5 X-Received: by 2002:a17:906:7a51:: with SMTP id i17mr5995602ejo.8.1588392998230; Fri, 01 May 2020 21:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588392998; cv=none; d=google.com; s=arc-20160816; b=TiDITxm/syHd8Tg6iqC4ZbVQjARKUaYY1H1CeHDkxcAF8gF4BViy+BhmmSapWgRStv CkKeJuPF5Kh4i5ZkLbC6WsQtiHmAovAMjueUYiIrZYvegoxfp523hXV+nZqwuuO4/cHl sKcz/gsQ9HvJTrPSXw8KBU+nfpZjgIJfoB2D4HnBCRRR0MlCaZViK/ZfaRinWtmdZG/T T9MKfxaoSMMGL3BlEiPn+MyeddboCYJ2BM+ohj/ZXBAMmvf1Myr0DlEh99+x416ZtSJj sM/4CWeZ3znr2eIFFnuv5DyfOisUlBHGTlc6D0vepp+h2e/NPaQmfuQTg9z+7VOR94Wn PLoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=AzOwTGLCqsoxcos1rC36ROn5pWK/vWwfcPGTzajxF68=; b=Aw0V/wtKxE0kACfafXPEJ5Oh9qAupa8EetkCUg0gfJPbXGG7ctH/RTpCsnWg7+mn+F PE8zVbiORUKVgp/9dxpY0Fx5dOpVXTk179LUZ+Lm5VGMt3j4hk6gTcU5mXd6Zq0aZXu9 tk2ZcF5N9qE9wCAlH5KziIo39Qf8pWBxA9dIycATN0VJfOA+YznbmWIfh+jFldAvCkQC E/TexTuyk/xW3UTJ9hFSwba5RLbhBM7hLleAvYLiqwJaKKutoCP0hND+1kmF8HPeH3z7 spFqO2AX5f/CbvBkUQk7sHTyV+a6jCbuMJrySS9wA9V7aOZQG0t/VgU6TZaExBl4S65V xqCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=kf2yU7Bs; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si2858967ejq.79.2020.05.01.21.16.15; Fri, 01 May 2020 21:16:38 -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=@lca.pw header.s=google header.b=kf2yU7Bs; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727776AbgEBEM1 (ORCPT + 99 others); Sat, 2 May 2020 00:12:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726846AbgEBEM1 (ORCPT ); Sat, 2 May 2020 00:12:27 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED2B1C08E859 for ; Fri, 1 May 2020 21:12:26 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id 71so9557599qtc.12 for ; Fri, 01 May 2020 21:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=AzOwTGLCqsoxcos1rC36ROn5pWK/vWwfcPGTzajxF68=; b=kf2yU7BsKbHqzFcVVJurq2/7ijIg6XVB+iwt2JTUEy76OXGB4gpE+VVijMuiRfKM7c xw9fpS3AerfR9/Z1YpZHd1X3sAbEpO4DlPE2CMHC0ZrkXb/ExGyMcqxK+VC66cx8LFLW kRC23+eMoFlPS8/d0Np6dfiuYsQkWrsQfpb1LLVj1o+ZeOZwmryFS3HgAS23YPGv4xAZ XCkkGiiep+y/PkA7p2cCbfRfjyXdrXA91XOVDSxw+NOEf1FH9QJU8dTt3IuHcP002Vl6 kqYxbsPinAZ//7Bd2Z43slseZJ24TpZAFdQQSfWfcuE1JCsBM4ei2I+V8c3/qdnbbYbz hhgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=AzOwTGLCqsoxcos1rC36ROn5pWK/vWwfcPGTzajxF68=; b=RIC2kDwF4x/raSO/mt+1JgYVR+RTxxd0yaQqh1MSl2uGnk2RmdvpIut7YSq2aX2edW IIDRkCiE+oMLqi3alaibGsPgTGyEWzzvHiECMpT+dnQ75xar+IcH1di76TfF+6fpnjMr g0nlk6YH1hWoVabXLbqcBt9JPMCeS0nYugTkwjAHysHFG4uFClEuM7oXYj/O9cT4RAAI f/gnYjXyXa85MahHZBLXX00YWWy++va39KMSGSOGbup6h+ZohaG2IP7owfvX8zF/oXaa oieNmGy+7AFFYKOPidsvS8//uhQCPmjCj5tjAgUc0QOAL57RzG4mlM2Uab9rf/qqEy7W kJQw== X-Gm-Message-State: AGi0PuZXdLk/pATMrodHhrwxK1uSj944DS1sazNRxEQ6ya/hqahzAbE2 wyVZR2S8V4R3+DOaXI+850JVIozTzT3KhA== X-Received: by 2002:aed:34c3:: with SMTP id x61mr6579161qtd.333.1588392746111; Fri, 01 May 2020 21:12:26 -0700 (PDT) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id y10sm4300219qki.63.2020.05.01.21.12.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 May 2020 21:12:25 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] net: fix memory leaks in flush_backlog() with RPS Date: Sat, 2 May 2020 00:12:24 -0400 Message-Id: References: <8a012879-825f-596d-9866-0dd3a095dfbb@gmail.com> Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <8a012879-825f-596d-9866-0dd3a095dfbb@gmail.com> To: Eric Dumazet X-Mailer: iPhone Mail (17D50) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 1, 2020, at 11:32 PM, Eric Dumazet wrote: >=20 > kfree_skb() is supposed to call skb_dst_drop() (look in skb_release_head_s= tate()) >=20 > If you think about it, we would have hundreds of similar bugs if this was n= ot the case. Thanks for quick response. Funny thing is that once I applied this patch, th= e leaks went away. It could be the fuzzers do not always reproduce the leaks= or it could be that call_rcu() in skb_dst_drop() takes a long time waiting f= or grace periods which may confuse kmemleak because skb has already gone.=