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:	Mon, 24 Feb 2014 15:30:15 +0200
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Qin Chuanyu <qinchuanyu@...wei.com>
Cc:	davem@...emloft.net, KVM list <kvm@...r.kernel.org>,
	netdev@...r.kernel.org
Subject: Re: [PATCH] openvswitch: orphan frags on local receive

On Mon, Feb 24, 2014 at 09:15:12PM +0800, Qin Chuanyu wrote:
> with vhost tx zero_copy, guest nic might get hang when host reserving
> skb in socket queue delivered by guest, the case has been solved in
> tun, it also been needed by openvswitch. This could easily happened
> when a LAST_ACK state tcp occuring between guest and host.
> 
> Signed-off-by: Chuanyu Qin <qinchuanyu@...wei.com>

Same question as with bridge.

> ---
>  net/openvswitch/vport-internal_dev.c |    3 +++
>  net/openvswitch/vport.c              |    1 +
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/net/openvswitch/vport-internal_dev.c
> b/net/openvswitch/vport-internal_dev.c
> index 729c687..adb25e2 100644
> --- a/net/openvswitch/vport-internal_dev.c
> +++ b/net/openvswitch/vport-internal_dev.c
> @@ -212,6 +212,9 @@ static int internal_dev_recv(struct vport
> *vport, struct sk_buff *skb)
>  	struct net_device *netdev = netdev_vport_priv(vport)->dev;
>  	int len;
> 
> +	if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
> +		return -NET_RX_DROP;
> +
>  	len = skb->len;
> 
>  	skb_dst_drop(skb);
> diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
> index 208dd9a..04172d6 100644
> --- a/net/openvswitch/vport.c
> +++ b/net/openvswitch/vport.c
> @@ -383,6 +383,7 @@ int ovs_vport_send(struct vport *vport, struct
> sk_buff *skb)
>  		u64_stats_update_end(&stats->syncp);
>  	} else if (sent < 0) {
>  		ovs_vport_record_error(vport, VPORT_E_TX_ERROR);
> +		skb_tx_error(skb);
>  		kfree_skb(skb);
>  	} else
>  		ovs_vport_record_error(vport, VPORT_E_TX_DROPPED);
> -- 
> 1.7.3.1.msysgit.0
--
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