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-next>] [day] [month] [year] [list]
Date:	Thu,  8 Oct 2009 10:32:41 +0800
From:	Thomas Chou <thomas@...ron.com.tw>
To:	netdev@...r.kernel.org
Cc:	thierry.reding@...onic-design.de,
	Nios2 development list <nios2-dev@...c.et.ntust.edu.tw>,
	linux-kernel@...r.kernel.org, Thomas Chou <thomas@...ron.com.tw>
Subject: [PATCH] ethoc: use NET_IP_ALIGN in skb_reserve()

As suggested by Stephen Hemminger.

Signed-off-by: Thomas Chou <thomas@...ron.com.tw>
---
 drivers/net/ethoc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index ecc53d9..4a1ed81 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -409,7 +409,7 @@ static int ethoc_rx(struct net_device *dev, int limit)
 			struct sk_buff *skb = netdev_alloc_skb(dev, size);
 
 			size -= 4; /* strip the CRC */
-			skb_reserve(skb, 2); /* align TCP/IP header */
+			skb_reserve(skb, NET_IP_ALIGN);
 
 			if (likely(skb)) {
 				void *src = phys_to_virt(bd.addr);
-- 
1.6.2.5

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