提交 55645e9b 编写于 作者: M Michael S. Tsirkin 提交者: Linus Torvalds

[PATCH] IB/mthca: fix MR allocation error path

Fix error handling in MR allocation for mem-free mode: mthca_free must get an
MR index, not a key.
Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: NRoland Dreier <roland@topspin.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 85665c98
......@@ -231,7 +231,7 @@ int mthca_mr_alloc_notrans(struct mthca_dev *dev, u32 pd,
mthca_table_put(dev, dev->mr_table.mpt_table, key);
err_out_mpt_free:
mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey);
mthca_free(&dev->mr_table.mpt_alloc, key);
kfree(mailbox);
return err;
}
......@@ -368,7 +368,7 @@ int mthca_mr_alloc_phys(struct mthca_dev *dev, u32 pd,
mthca_table_put(dev, dev->mr_table.mpt_table, key);
err_out_mpt_free:
mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey);
mthca_free(&dev->mr_table.mpt_alloc, key);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册