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:	Mon, 27 Apr 2015 22:57:09 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	kys@...rosoft.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
	jasowang@...hat.com
Subject: Re: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()

From: "K. Y. Srinivasan" <kys@...rosoft.com>
Date: Mon, 27 Apr 2015 18:14:50 -0700

> Commit commit b08cc79155fc26d0d112b1470d1ece5034651a4b eliminated memory
> allocation in the packet send path. This commit introduced a bug since it
> did not account for the case if the skb was cloned. Fix this bug by
> using the pre-reserved head room only if the skb is not cloned.
> 
> Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>

We have generic infrastructure to do this, please try instead:

	err = skb_cow_head(skb, pkt_sz);

this will take care of everything for you and you can get rid
of all of this dynamic memory allocation etc. in this code
path.
--
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