[openib-general] [PATCH] IPOIB: initialization patch in ipoib

Shirley Ma xma at us.ibm.com
Thu Feb 17 16:57:07 PST 2005


Here is the patch for :

1. initialize path->ah = NULL
2. move neigh->neighbour->ops before kfree(neigh)
3. set neighbour->ops->destructor to NULL while kfree(neigh)

diff -urN infiniband/ulp/ipoib/ipoib_main.c 
infiniband-patch/ulp/ipoib/ipoib_main.c
--- infiniband/ulp/ipoib/ipoib_main.c   2005-02-17 17:24:56.000000000 
+0000
+++ infiniband-patch/ulp/ipoib/ipoib_main.c     2005-02-18 
00:52:22.000000000 +0000
@@ -348,6 +348,7 @@
 
        path->dev = dev;
        path->pathrec.dlid = 0;
+       path->ah = NULL;
 
        skb_queue_head_init(&path->queue);
 
@@ -450,8 +451,8 @@
 err:
        *to_ipoib_neigh(skb->dst->neighbour) = NULL;
        list_del(&neigh->list);
-       kfree(neigh);
        neigh->neighbour->ops->destructor = NULL;
+       kfree(neigh);
 
        ++priv->stats.tx_dropped;
        dev_kfree_skb_any(skb);
@@ -673,6 +674,7 @@
                        ipoib_put_ah(neigh->ah);
                list_del(&neigh->list);
                *to_ipoib_neigh(n) = NULL;
+               n->ops->destructor = NULL;
                kfree(neigh);
        }
 



Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050217/a210810b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: infiniband-patch.1
Type: application/octet-stream
Size: 755 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050217/a210810b/attachment.obj>


More information about the general mailing list