Subject: Re: [PATCH 04/11] IB/ipoib: Verify address handle validity on send

From: Roland Dreier <[email-masked]>
Date: Mon, 17 Sep 2007 15:20:48 -0700

Looks fine overall, with one minor nitpick:

 > -			if (unlikely(memcmp(&neigh->dgid.raw,
 > +			if (unlikely((memcmp(&neigh->dgid.raw,
 >  					    skb->dst->neighbour->ha + 4,
 > -					    sizeof(union ib_gid)))) {
 > +					    sizeof(union ib_gid))) ||
 > +						 (neigh->dev != dev))) {

the indentation here makes this confusing to read -- I would just do:

 		} else if (neigh->ah) {
 			if (unlikely(memcmp(&neigh->dgid.raw,
 					    skb->dst->neighbour->ha + 4,
-					    sizeof(union ib_gid)))) {
+					    sizeof(union ib_gid)) ||
+				     neigh->dev != dev)) {