lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 May 2019 11:16:13 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, mst@...hat.com, yuehaibing@...wei.com,
        xiyou.wangcong@...il.com, weiyongjun1@...wei.com,
        eric.dumazet@...il.com
Subject: Re: [PATCH net V2] tuntap: synchronize through tfiles array instead
 of tun->numqueues


On 2019/5/9 上午1:36, David Miller wrote:
> From: Jason Wang <jasowang@...hat.com>
> Date: Tue,  7 May 2019 00:03:36 -0400
>
>> @@ -1313,6 +1315,10 @@ static int tun_xdp_xmit(struct net_device *dev, int n,
>>   
>>   	tfile = rcu_dereference(tun->tfiles[smp_processor_id() %
>>   					    numqueues]);
>> +	if (!tfile) {
>> +		rcu_read_unlock();
>> +		return -ENXIO; /* Caller will free/return all frames */
>> +	}
>>   
>>   	spin_lock(&tfile->tx_ring.producer_lock);
>>   	for (i = 0; i < n; i++) {
> The only way we can see a NULL here is if a detach happened in parallel,
> and if that happens we should retry the tfile[] indexing after resampling
> numqueues rather than dropping the packet.


Ok, will fix this in V3.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ