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:	Sun, 28 Jul 2013 06:40:52 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Francois Romieu <romieu@...zoreil.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [net PATCH v2] 8139cp: Add dma_mapping_error checking

On Fri, Jul 26, 2013 at 11:24:03PM +0200, Francois Romieu wrote:
> Neil Horman <nhorman@...driver.com> :
> > On Fri, Jul 26, 2013 at 10:06:30PM +0200, Francois Romieu wrote:
> > > Neil Horman <nhorman@...driver.com> :
> [...]
> > > > @@ -533,6 +533,11 @@ rx_status_loop:
> > > >  
> > > >  		mapping = dma_map_single(&cp->pdev->dev, new_skb->data, buflen,
> > > >  					 PCI_DMA_FROMDEVICE);
> > > > +		if (dma_mapping_error(&cp->pdev->dev, mapping)) {
> > > > +			kfree_skb(skb);
> > > 
> > > 			dev->stats.rx_dropped++;
> > > 
> > > Sorry, I did not notice that skb contained newly received data :o/
> > > 
> > Yeah, this isn't needed.  The skb being mapped in is newly allocated, and
> > contains no data.  We haven't dropped anything here, so theres no need for the
> > stats bump.
> 
> Huh ?
> 
> [...error path...]
> 		kfree(skb);
> [...normal path...]
> 	cp_rx_skb(cp, skb, desc);
> 
> Afaiks it's the same skb. We drop data and a stats bump is needed.
> 
> [...]
> > Thoughts?
> 
> Nevermind. cp_start_xmit is a piece of it and it isn't your work to
> turn it into something sensible.
> 
So you agree with the patch as it stands?
Neil

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