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: <20070626221736.GA22252@alpha.franken.de>
Date:	Wed, 27 Jun 2007 00:17:36 +0200
From:	tsbogend@...ha.franken.de (Thomas Bogendoerfer)
To:	Francois Romieu <romieu@...zoreil.com>
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org,
	jgarzik@...ox.com
Subject: Re: [PATCH UPDATE]  Extract chip specific code out of lasi_82596.c

On Tue, Jun 26, 2007 at 11:47:55PM +0200, Francois Romieu wrote:
> Thomas Bogendoerfer <tsbogend@...ha.franken.de> :
> [...]
> > +static inline void init_rx_bufs(struct net_device *dev)
> > +{
> > +	struct i596_private *lp = netdev_priv(dev);
> > +	struct i596_dma *dma = lp->dma;
> > +	int i;
> > +	struct i596_rfd *rfd;
> > +	struct i596_rbd *rbd;
> > +
> > +	/* First build the Receive Buffer Descriptor List */
> > +
> > +	for (i = 0, rbd = dma->rbds; i < rx_ring_size; i++, rbd++) {
> > +		dma_addr_t dma_addr;
> > +		struct sk_buff *skb = dev_alloc_skb(PKT_BUF_SZ + 4);
> > +
> > +		if (skb == NULL)
> > +			panic(KERN_ERR "%s: alloc_skb() failed", __FILE__);
> 
> The driver could use netdev_alloc_skb.

what's the advantage ?

> init_rx_bufs() should handle failure more gracefully and return a proper
> status code.

of course.

> 
> [...]
> > +static int init_i596_mem(struct net_device *dev)
> > +{
> [...]
> > +	if (request_irq(dev->irq, &i596_interrupt, 0, "i82596", dev)) {
> > +		printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq);
> > +		goto failed_free_irq;
> > +	}
> [...]
> > +failed_free_irq:
> > +	free_irq(dev->irq, dev);
> 
> Oops.

thanks, will fix.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]
-
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