summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHal Rosenstock <halr@voltaire.com>2005-04-17 00:26:05 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-17 00:26:05 +0200
commit62241eb497721be7640e5d9330e60f4a88a4db46 (patch)
tree5bf7d25db72b20d0781190c0e3c72cea94a2ecb3
parent[PATCH] Maintainers list update: linux-net -> netdev (diff)
downloadlinux-62241eb497721be7640e5d9330e60f4a88a4db46.tar.xz
linux-62241eb497721be7640e5d9330e60f4a88a4db46.zip
[PATCH] IPoIB: set skb->mac.raw on receive
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index c5a1d45e0ac5..8238766746b2 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -201,7 +201,7 @@ static void ipoib_ib_handle_wc(struct net_device *dev,
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;