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] [day] [month] [year] [list]
Date:	Sat, 6 Sep 2014 17:38:08 +0300
From:	Shmulik Ladkani <shmulik.ladkani@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 3/9] net: Move main gso loop out of
 dev_hard_start_xmit() into helper.

Hi,

On Mon, 01 Sep 2014 15:24:50 -0700 (PDT) David Miller <davem@...emloft.net> wrote:
> @@ -2681,25 +2709,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
>  	}
>  
>  gso:
> -	do {
> -		struct sk_buff *nskb = skb->next;
> -
> -		skb->next = nskb->next;
> -		nskb->next = NULL;
> -
> -		rc = xmit_one(nskb, dev, txq);
> -		if (unlikely(rc != NETDEV_TX_OK)) {
> -			if (rc & ~NETDEV_TX_MASK)
> -				goto out_kfree_gso_skb;
> -			nskb->next = skb->next;
> -			skb->next = nskb;
> -			return rc;
> -		}
> -		if (unlikely(netif_xmit_stopped(txq) && skb->next))
> -			return NETDEV_TX_BUSY;
> -	} while (skb->next);
> -
> -out_kfree_gso_skb:
> +	skb->next = xmit_list(skb->next, dev, txq, &rc);
>  	if (likely(skb->next == NULL)) {
>  		skb->destructor = DEV_GSO_CB(skb)->destructor;
>  		consume_skb(skb);
> 	}
> out_kfree_skb:
> 	kfree_skb(skb);

Formely, if 'netif_xmit_stopped(txq) && skb->next', NETDEV_TX_BUSY was
returned, but the head 'skb' wasn't freed;
Currently, if 'xmit_list' returns non-NULL due to same reason, head skb
gets freed in out_kfree_skb.

I'm not certain, but it looks like an oversight that got fixed later in
the patchset:
In net-next ce93718fb "net: Don't keep around original SKB when we
software segment GSO frames." the 'kfree_skb(skb)' in
'dev_hard_start_xmit' got relocated into validate_xmit_skb's gso
segmentation part, making the issue disappear.

Am I right? Didn't we miss anything else here?
--
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