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]
Message-ID: <20100125083322.2100eab1@nehalam>
Date:	Mon, 25 Jan 2010 08:33:22 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Kristoffer Glembo <kristoffer@...sler.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	Kristoffer Glembo <kristoffer@...sler.com>
Subject: Re: [PATCH 1/1 V4] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC
 driver

On Mon, 25 Jan 2010 12:01:12 +0100
Kristoffer Glembo <kristoffer@...sler.com> wrote:

> +static int greth_start_xmit(struct sk_buff *skb, struct net_device *dev)
> +{
> +	struct greth_private *greth = netdev_priv(dev);
> +	struct greth_bd *bdp;
> +	int err = NETDEV_TX_OK;
> +	u32 status, dma_addr;
> +
> +	bdp = greth->tx_bd_base + greth->tx_next;
> +
> +	if (unlikely(greth->tx_free <= 0)) {
> +		netif_stop_queue(dev);
> +		err = NETDEV_TX_BUSY;
> +		goto out;
> +	}
...
> +
> +out:
> +	dev_kfree_skb(skb);
> +	return err;
> +}
> +

Wrong, if device is busy; then skb must NOT be freed.


-- 
--
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