]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
IB/iser: Rewrite SG handling for RDMA logic
authorOr Gerlitz <ogerlitz@voltaire.com>
Thu, 12 Nov 2009 19:32:27 +0000 (11:32 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:36 +0000 (07:41 -0700)
commit7ecc5d44a8c9fbcdcda755a9a74463e2b8945c07
tree6c4584ec82ce279b754097bd7f0efece82d5bbf4
parenta798d8b0cb51bb966763e0feafcbff7097eb3978
IB/iser: Rewrite SG handling for RDMA logic

commit c1ccaf2478f84c2665cf57f981db143aa582d646 upstream.

After dma-mapping an SG list provided by the SCSI midlayer, iser has
to make sure the mapped SG is "aligned for RDMA" in the sense that its
possible to produce one mapping in the HCA IOMMU which represents the
whole SG. Next, the mapped SG is formatted for registration with the HCA.

This patch re-writes the logic that does the above, to make it clearer
and simpler. It also fixes a bug in the being aligned for RDMA checks,
where a "start" check wasn't done but rather only "end" check.

[commit message in RH kernel tree: "Under heavy load, without the patch,
the HCA can be programmed to write (corrupt) into pages/location which
doesn't belong to the SG associated with the actual I/O and cause a
kernel oops."]

Signed-off-by: Alexander Nezhinsky <alexandern@voltaire.com>
Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/infiniband/ulp/iser/iser_memory.c