RDMA/cxgb4: Always release neigh entry
authorSteve Wise <swise@opengridcomputing.com>
Wed, 19 Mar 2014 12:14:40 +0000 (17:44 +0530)
committerRoland Dreier <roland@purestorage.com>
Thu, 20 Mar 2014 16:59:04 +0000 (09:59 -0700)
Always release the neigh entry in rx_pkt().

Based on original work by Santosh Rastapur <santosh@chelsio.com>.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/cm.c

index 360807eaffecbff1bcd3a1ef0751bba82f36a8a0..2b2af962cc64c4b2459a2972012d220193c134c3 100644 (file)
@@ -3347,13 +3347,13 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb)
                pi = (struct port_info *)netdev_priv(pdev);
                tx_chan = cxgb4_port_chan(pdev);
        }
+       neigh_release(neigh);
        if (!e) {
                pr_err("%s - failed to allocate l2t entry!\n",
                       __func__);
                goto free_dst;
        }
 
-       neigh_release(neigh);
        step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan;
        rss_qid = dev->rdev.lldi.rxq_ids[pi->port_id * step];
        window = (__force u16) htons((__force u16)tcph->window);