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>
Šī revīzija ir iekļauta:

revīziju iesūtīja
David S. Miller

vecāks
c9467447fc
revīzija
5f33141d2f
@@ -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;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user