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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 27 Apr 2008 19:02:38 +0200
From:	Francois Romieu <romieu@...zoreil.com>
To:	jeff@...zik.org, netdev@...r.kernel.org
Cc:	akpm@...ux-foundation.org,
	Stephen Hemminger <shemminger@...tta.com>
Subject: [PATCH 2/6] sis190: hard-code the alignment of tiny packets

There is no DMA involved here. Align the IP header without condition.

Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
Acked-by: Francois Romieu <romieu@...zoreil.com>
---
 drivers/net/sis190.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 0d6aa1f..248c385 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -526,9 +526,9 @@ static inline int sis190_try_rx_copy(struct sk_buff **sk_buff, int pkt_size,
 	if (pkt_size < rx_copybreak) {
 		struct sk_buff *skb;
 
-		skb = dev_alloc_skb(pkt_size + NET_IP_ALIGN);
+		skb = dev_alloc_skb(pkt_size + 2);
 		if (skb) {
-			skb_reserve(skb, NET_IP_ALIGN);
+			skb_reserve(skb, 2);
 			skb_copy_to_linear_data(skb, sk_buff[0]->data, pkt_size);
 			*sk_buff = skb;
 			sis190_give_to_asic(desc, rx_buf_sz);
-- 
1.5.3.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