summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorShaobo He <shaobo@cs.utah.edu>2019-03-01 01:38:38 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-03-04 23:41:30 +0300
commit952a3cc9c06a6143147ccdd108c5ef8ac9a6454c (patch)
tree339be30c48b683ee1dfcb3cd139ae25b40c363f8 /drivers/infiniband
parentd757c60eca9b22f4d108929a24401e0fdecda0b1 (diff)
downloadlinux-952a3cc9c06a6143147ccdd108c5ef8ac9a6454c.tar.xz
cxgb4: kfree mhp after the debug print
In function `c4iw_dealloc_mw`, variable mhp's value is printed after freed, it is clearer to have the print before the kfree. Otherwise racing threads could allocate another mhp with the same pointer value and create confusing tracing. Signed-off-by: Shaobo He <shaobo@cs.utah.edu> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb4/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
index 8d1ab8273c2b..5baa31ab6366 100644
--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -678,8 +678,8 @@ int c4iw_dealloc_mw(struct ib_mw *mw)
mhp->wr_waitp);
kfree_skb(mhp->dereg_skb);
c4iw_put_wr_wait(mhp->wr_waitp);
- kfree(mhp);
pr_debug("ib_mw %p mmid 0x%x ptr %p\n", mw, mmid, mhp);
+ kfree(mhp);
return 0;
}