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:	Wed, 27 Nov 2013 10:12:45 +0800
From:	Jason Wang <jasowang@...hat.com>
To:	Vlad Yasevich <vyasevic@...hat.com>, netdev@...r.kernel.org
CC:	mst@...hat.com
Subject: Re: [PATCH] macvtap: Do not double-count received packets

On 11/27/2013 01:37 AM, Vlad Yasevich wrote:
> Currently macvlan will count received packets after calling each
> vlans receive handler.   Macvtap attempts to count the packet
> yet again when the user reads the packet from the tap socket.
> This code doesn't do this consistently either.  Remove the
> counting from macvap and let only macvlan count received
> packets.
>
> Signed-off-by: Vlad Yasevich <vyasevic@...hat.com>
> ---
>  drivers/net/macvtap.c | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
> index dc76670..50f8dce 100644
> --- a/drivers/net/macvtap.c
> +++ b/drivers/net/macvtap.c
> @@ -767,7 +767,6 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
>  				const struct sk_buff *skb,
>  				const struct iovec *iv, int len)
>  {
> -	struct macvlan_dev *vlan;
>  	int ret;
>  	int vnet_hdr_len = 0;
>  	int vlan_offset = 0;
> @@ -821,15 +820,6 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
>  	copied += len;
>  
>  done:
> -	rcu_read_lock();
> -	vlan = rcu_dereference(q->vlan);
> -	if (vlan) {
> -		preempt_disable();
> -		macvlan_count_rx(vlan, copied - vnet_hdr_len, ret == 0, 0);
> -		preempt_enable();
> -	}
> -	rcu_read_unlock();
> -
>  	return ret ? ret : copied;
>  }
>  

Acked-by: Jason Wang <jasowang@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ