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>] [day] [month] [year] [list]
Message-ID: <20080416151058.26ceaf42@extreme>
Date:	Wed, 16 Apr 2008 15:10:58 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Jeff Garzik <jgarzik@...ox.com>, Andy@...l.vyatta.com,
	"Fleming <afleming"@freescale.com,
	Becky Bruce <bgill@...escale.com>,
	Kumar Gala <galak@...nel.crashing.org>
Cc:	netdev@...r.kernel.org
Subject: gianfar: rx buffer management

I was looking at all drivers to update them to use netdev_alloc_skb
and noticed this turd in the gianfar.c driver:

struct sk_buff * gfar_new_skb(struct net_device *dev, struct rxbd8 *bdp)
{
	unsigned int alignamount;
	struct gfar_private *priv = netdev_priv(dev);
	struct sk_buff *skb = NULL;
	unsigned int timeout = SKB_ALLOC_TIMEOUT;

	/* We have to allocate the skb, so keep trying till we succeed */
	while ((!skb) && timeout--)
		skb = dev_alloc_skb(priv->rx_buffer_size + RXBUF_ALIGNMENT);


Trying a million times in softirq is not going to work. Please change to use
a more sane strategy. Probably the simples would be to allocate a new skb
before processing the current buffer and if that fails, just drop the current
rx packet and reuse the skb.
--
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