public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: [PATCH][1/3] IPoIB: set skb->mac.raw on receive
Date: Thu, 31 Mar 2005 19:36:11 -0800	[thread overview]
Message-ID: <20053311936.983q6QLaPvAkIcQj@topspin.com> (raw)
In-Reply-To: 

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;


             reply	other threads:[~2005-04-01  3:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-01  3:36 Roland Dreier [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20053311936.983q6QLaPvAkIcQj@topspin.com \
    --to=roland@topspin.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openib-general@openib.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox