Commit:     200d1713b47200aa478f27e454e3d957264d49be
Parent:     732a2170f499ce7cf5f0bdd4f9e0b0c8337b67e1
Author:     Moni Shoua <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 9 19:43:37 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 14:20:45 2007 -0400

    IB/ipoib: Verify address handle validity on send
    When the bonding device senses a carrier loss of its active slave it 
    that slave with a new one. In between the times when the carrier of an IPoIB
    device goes down and ipoib_neigh is destroyed, it is possible that the
    bonding driver will send a packet on a new slave that uses an old 
    This patch detects and prevents this from happenning.
    Signed-off-by: Moni Shoua <monis at>
    Signed-off-by: Or Gerlitz <ogerlitz at>
    Acked-by: Roland Dreier <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c 
index cae026c..362610d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -692,9 +692,10 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct 
net_device *dev)
                                goto out;
                } else if (neigh->ah) {
-                       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))) {
                                 * It's safe to call ipoib_put_ah() inside
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to