aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib_mr.h
diff options
context:
space:
mode:
authorGerd Rausch <gerd.rausch@oracle.com>2019-07-16 15:29:02 -0700
committerDavid S. Miller <davem@davemloft.net>2019-07-17 12:06:52 -0700
commit5f33141d2fc05a2d2134ba0e7b47ce4aa88340f0 (patch)
treef9d33d3deee13ee1c1b939495d18b238c48db70f /net/rds/ib_mr.h
parentnet/rds: Get rid of "wait_clean_list_grace" and add locking (diff)
downloadlinux-dev-5f33141d2fc05a2d2134ba0e7b47ce4aa88340f0.tar.xz
linux-dev-5f33141d2fc05a2d2134ba0e7b47ce4aa88340f0.zip
net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV
In order to: 1) avoid a silly bouncing between "clean_list" and "drop_list" triggered by function "rds_ib_reg_frmr" as it is releases frmr regions whose state is not "FRMR_IS_FREE" right away. 2) prevent an invalid access error in a race from a pending "IB_WR_LOCAL_INV" operation with a teardown ("dma_unmap_sg", "put_page") and de-registration ("ib_dereg_mr") of the corresponding memory region. Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/rds/ib_mr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rds/ib_mr.h b/net/rds/ib_mr.h
index ab26c20ed66f..9045a8c0edff 100644
--- a/net/rds/ib_mr.h
+++ b/net/rds/ib_mr.h
@@ -58,6 +58,8 @@ struct rds_ib_frmr {
enum rds_ib_fr_state fr_state;
bool fr_inv;
wait_queue_head_t fr_inv_done;
+ bool fr_reg;
+ wait_queue_head_t fr_reg_done;
struct ib_send_wr fr_wr;
unsigned int dma_npages;
unsigned int sg_byte_len;