Re: [PATCH net] net: Fix memory leaks of napi->rx_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux