]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mthca: Free correct MPT on error exit from mthca_fmr_alloc()
authorRoland Dreier <rolandd@cisco.com>
Tue, 19 Feb 2008 18:42:50 +0000 (10:42 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 19 Feb 2008 18:42:50 +0000 (10:42 -0800)
commitc3f510bb1a2e9544b89413da84d544eb2cfe1762
tree23839936fc223e7076eb4a482e8720b81801f107
parent8279b78c41225349fa5c0e3cdec25be3cef51eba
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>
drivers/infiniband/hw/mthca/mthca_mr.c