[patch 153/198] IPoIB: set skb->mac.raw on receive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hal Rosenstock <[email protected]>

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 <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 25-akpm/drivers/infiniband/ulp/ipoib/ipoib_ib.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/infiniband/ulp/ipoib/ipoib_ib.c~ipoib-set-skb-macraw-on-receive drivers/infiniband/ulp/ipoib/ipoib_ib.c
--- 25/drivers/infiniband/ulp/ipoib/ipoib_ib.c~ipoib-set-skb-macraw-on-receive	2005-04-12 03:21:40.242019184 -0700
+++ 25-akpm/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2005-04-12 03:21:40.245018728 -0700
@@ -201,7 +201,7 @@ static void ipoib_ib_handle_wc(struct ne
 			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;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux