On Wed, Feb 01, 2023 at 10:42:41PM -0600, Bob Pearson wrote: > Currently the rxe driver does not handle all cases of zero length > rdma operations correctly. The client does not have to provide an > rkey for zero length RDMA read or write operations so the rkey > provided may be invalid and should not be used to lookup an mr. > > This patch corrects the driver to ignore the provided rkey if the > reth length is zero for read or write operations and make sure to > set the mr to NULL. In read_reply() if length is zero rxe_recheck_mr() > is not called. Warnings are added in the routines in rxe_mr.c to > catch NULL MRs when the length is non-zero. > > Signed-off-by: Bob Pearson <rpearsonhpe@xxxxxxxxx> > Reviewed-by: Daisuke Matsuda <matsuda-daisuke@xxxxxxxxxxx> > --- > v4: > Fixed a regression in flush operations because the rkey must be > valid in that case even if the length is zero which maybe the > case for selectivity level of the entire memory region. > > Reported-by: Daisuke Matsuda <matsuda-daisuke@xxxxxxxxxxx> Applied to for-next, I added a fixes line for day 0 Jason