On FMR unmap, mthca masks high bits in key, which removes the
effect of Sinai work-around applied in adjust_key during FMR
allocation.
This triggers data corruption when the region is next mapped.

Fix by re-applying Sinai work-around after masking the key.
Thanks to Or Gerlitz for reproducing the problem, and Ariel Shahar
for help in debug.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

--

The patch's been running on Or's system for half an hor now without failures
(used to fail after a couple of minutes).
Roland, this is an old bug, I think we want to queue the patch for 2.6.20/2.6.19
stable kernels as well.

Tziporet, could you put this on OFED 1.1 support page as well?

diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c 
b/drivers/infiniband/hw/mthca/mthca_mr.c
index fdb576d..ee561c5 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -835,6 +835,7 @@ void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct 
mthca_fmr *fmr)
 
        key = arbel_key_to_hw_index(fmr->ibmr.lkey);
        key &= dev->limits.num_mpts - 1;
+       key = adjust_key(dev, key);
        fmr->ibmr.lkey = fmr->ibmr.rkey = arbel_hw_index_to_key(key);
 
        fmr->maps = 0;


-- 
MST
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to