summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorAndrew Boyer2017-08-28 22:11:55 +0200
committerDoug Ledford2017-08-29 01:12:34 +0200
commit825a51a4af82fd90c1fd98b080439d8593972457 (patch)
tree756d13980e4ceac6710275a09a7e25269cd7a2bb /drivers/infiniband/sw
parentIB/rxe: Add dst_clone() in prepare_ipv6_hdr() (diff)
downloadkernel-qcow2-linux-825a51a4af82fd90c1fd98b080439d8593972457.tar.gz
kernel-qcow2-linux-825a51a4af82fd90c1fd98b080439d8593972457.tar.xz
kernel-qcow2-linux-825a51a4af82fd90c1fd98b080439d8593972457.zip
IB/rxe: Fix up rxe_qp_cleanup()
Replace sk_dst_get()/dst_release() in rxe_qp_cleanup() with sk_dst_reset(). sk_dst_get() takes a new reference on dst, so the dst_release() doesn't actually release the original reference, which was the design intent. Fixes: 4ed6ad1eb30e ("IB/rxe: Cache dst in QP instead of getting it...") Signed-off-by: Andrew Boyer <andrew.boyer@dell.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_qp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 80ccc7c7c341..00bda9380a2e 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -851,13 +851,8 @@ void rxe_qp_cleanup(struct rxe_pool_entry *arg)
qp->resp.mr = NULL;
}
- if (qp_type(qp) == IB_QPT_RC) {
- struct dst_entry *dst = NULL;
-
- dst = sk_dst_get(qp->sk->sk);
- if (dst)
- dst_release(dst);
- }
+ if (qp_type(qp) == IB_QPT_RC)
+ sk_dst_reset(qp->sk->sk);
free_rd_atomic_resources(qp);