From: Edward Cree <ecree.xilinx@gmail.com>
To: Eric Dumazet <edumazet@google.com>, Wang Yufen <wangyufen@huawei.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, ecree@amd.com
Subject: Re: [PATCH net] net: Fix memory leaks of napi->rx_list
Date: Wed, 2 Nov 2022 15:28:52 +0000 [thread overview]
Message-ID: <7632c326-5727-2c71-9895-08c540b2c8d5@gmail.com> (raw)
In-Reply-To: <CANn89i+cNjUH8pR0-QTdWM09G8ZfX_gzDqOY6ecyY4igDwrYaQ@mail.gmail.com>
On 02/11/2022 04:27, Eric Dumazet wrote:
<snip>
> I do not think the bug is there.
>
> Most likely tun driver is buggy.
<snip>
>> @@ -6471,6 +6481,7 @@ void __netif_napi_del(struct napi_struct *napi)
>> list_del_rcu(&napi->dev_list);
>> napi_free_frags(napi);
>>
>> + flush_rx_list(napi);
But maybe it makes sense to put a WARN_ON_ONCE(!list_empty(&napi->rx_list))
here, to catch such buggy drivers sooner. WDYT?
-ed
prev parent reply other threads:[~2022-11-02 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 3:54 [PATCH net] net: Fix memory leaks of napi->rx_list Wang Yufen
2022-11-02 4:27 ` Eric Dumazet
2022-11-02 7:58 ` wangyufen
2022-11-02 15:28 ` Edward Cree [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7632c326-5727-2c71-9895-08c540b2c8d5@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=ecree@amd.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wangyufen@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox