diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-02-19 19:42:50 +0100 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-02-19 19:42:50 +0100 |
commit | b7f9c112a5e7f68d77a31c79f5942a3272ae9a3b (patch) | |
tree | 23839936fc223e7076eb4a482e8720b81801f107 /drivers/infiniband/hw/mthca | |
parent | IPoIB/cm: Fix ipoib_cm_dev_stop() cleanup when drain times out (diff) | |
download | linux-b7f9c112a5e7f68d77a31c79f5942a3272ae9a3b.tar.xz linux-b7f9c112a5e7f68d77a31c79f5942a3272ae9a3b.zip |
IB/mthca: Free correct MPT on error exit from mthca_fmr_alloc()
When mthca_fmr_alloc() returns an error, it should free the MPT at the
index key, not mr->ibmr.lkey, since the lkey has been mangled by
hw_index_to_key() and no longer is the real index. This bug causes
corruption of the MPT table free bitmap when mthca_fmr_alloc() fails.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c index 3b6985557cb2..3538da16e3fe 100644 --- a/drivers/infiniband/hw/mthca/mthca_mr.c +++ b/drivers/infiniband/hw/mthca/mthca_mr.c @@ -686,7 +686,7 @@ err_out_table: 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; } |