[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>
This commit is contained in:
parent
48a5346b31
commit
62241eb497
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue