public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][1/3] IPoIB: set skb->mac.raw on receive
@ 2005-04-01  3:36 Roland Dreier
  2005-04-01  3:36 ` [PATCH][2/3] IPoIB: fix static rate calculation Roland Dreier
  2005-04-01  4:18 ` [PATCH][1/3] IPoIB: set skb->mac.raw on receive David S. Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Roland Dreier @ 2005-04-01  3:36 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, openib-general

From: Hal Rosenstock <halr@voltaire.com>

Set skb->mac.raw on receive.  This fixes crashes when this is
dereferenced, for example by netfilter or when PF_PACKET is used.

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <roland@topspin.com>

--- linux-export.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2005-03-31 19:07:06.912605203 -0800
+++ linux-export/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2005-03-31 19:23:30.599053347 -0800
@@ -201,7 +201,7 @@
 			if (wc->slid != priv->local_lid ||
 			    wc->src_qp != priv->qp->qp_num) {
 				skb->protocol = ((struct ipoib_header *) skb->data)->proto;
-
+				skb->mac.raw = skb->data;
 				skb_pull(skb, IPOIB_ENCAP_LEN);
 
 				dev->last_rx = jiffies;


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-04-01 17:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-01  3:36 [PATCH][1/3] IPoIB: set skb->mac.raw on receive Roland Dreier
2005-04-01  3:36 ` [PATCH][2/3] IPoIB: fix static rate calculation Roland Dreier
2005-04-01  3:36   ` [PATCH][3/3] IPoIB: convert to debugfs Roland Dreier
2005-04-01 17:45     ` [PATCH][4/3] IPoIB: document conversion " Roland Dreier
2005-04-01  4:18 ` [PATCH][1/3] IPoIB: set skb->mac.raw on receive David S. Miller
2005-04-01  4:24   ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox