linux-hardened/drivers/infiniband/hw
Roland Dreier 532c3b5817 IB/mthca: Fix mthca_write_mtt() on HCAs with hidden memory
Commit b2875d4c ("IB/mthca: Always fill MTTs from CPU") causes a crash
in mthca_write_mtt() with non-memfree HCAs that have their memory
hidden (that is, have only two PCI BARs instead of having a third BAR
that allows access to the RAM attached to the HCA) on 64-bit
architectures.  This is because the commit just before, c20e20ab
("IB/mthca: Merge MR and FMR space on 64-bit systems") makes
dev->mr_table.fmr_mtt_buddy equal to &dev->mr_table.mtt_buddy and
hence mthca_write_mtt() tries to write directly into the HCA's MTT
table.  However, since that table is in the HCA's memory, this is
impossible without the PCI BAR that gives access to that memory.

This causes a crash because mthca_tavor_write_mtt_seg() basically
tries to dereference some offset of a NULL pointer.  Fix this by
adding a test of MTHCA_FLAG_FMR in mthca_write_mtt() so that we always
use the WRITE_MTT firmware command rather than writing directly if
FMRs are not enabled.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-04-24 16:31:04 -07:00
..
amso1100 [PATCH] Scheduled removal of SA_xxx interrupt flags fixups 2007-02-14 08:09:54 -08:00
cxgb3 RDMA/cxgb3: Add set_tcb_rpl_handler 2007-04-12 10:37:11 -07:00
ehca IB/ehca: Make scaling code work without CPU hotplug 2007-03-22 14:40:16 -07:00
ipath IB/ipath: Fix WC format drift between user and kernel space 2007-04-18 20:21:01 -07:00
mthca IB/mthca: Fix mthca_write_mtt() on HCAs with hidden memory 2007-04-24 16:31:04 -07:00