diff options
author | Jason Gunthorpe <[email protected]> | 2020-10-26 15:19:31 +0200 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2020-11-02 14:31:40 -0400 |
commit | fc3325701a6353594083f08e297d4c1965c601aa (patch) | |
tree | 40b15b7294d5b61a7eced753cb2913f8c7ce7d29 /net/lapb/lapb_subr.c | |
parent | b4d031cdae1301a8e5e9dba2a862ef028717cb17 (diff) |
RDMA/mlx5: Fix corruption of reg_pages in mlx5_ib_rereg_user_mr()
reg_pages should always contain mr->npage since when the mr is finally
de-reg'd it is always subtracted out.
If there were any error exits then mlx5_ib_rereg_user_mr() would leave the
reg_pages adjusted and this will cause it to be double subtracted
eventually.
The manipulation of reg_pages is inherently connected to the umem, so lift
it out of set_mr_fields() and only adjust it around creating/destroying a
umem.
reg_pages is only used for diagnostics in sysfs.
Fixes: 7d0cc6edcc70 ("IB/mlx5: Add MR cache for large UMR regions")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions