]> git.baikalelectronics.ru Git - kernel.git/commit
net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_...
authorGerd Rausch <gerd.rausch@oracle.com>
Tue, 16 Jul 2019 22:29:02 +0000 (15:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jul 2019 19:06:52 +0000 (12:06 -0700)
commit5fad4ab2de02d2a2909e057a4315d750dd8cf0f6
treef9d33d3deee13ee1c1b939495d18b238c48db70f
parent72227acd4399073066d30ec0151532ffd618c402
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>
net/rds/ib_frmr.c
net/rds/ib_mr.h