diff options
author | Dean Luick <dean.luick@cornelisnetworks.com> | 2023-01-09 12:31:26 -0500 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-01-10 12:21:50 +0200 |
commit | 1c7edde1b5720ddb0aff5ca8c7f605a0f92526eb (patch) | |
tree | 6b04705962243b102e3e23cde0d14325f1709791 /drivers/infiniband/hw/hfi1/user_exp_rcv.h | |
parent | e0c4a422f5246abefbf7c178ef99a1f2dc3c5f62 (diff) |
IB/hfi1: Immediately remove invalid memory from hardware
When a user expected receive page is unmapped, it should be
immediately removed from hardware rather than depend on a
reaction from user space.
Fixes: 2677a7680e77 ("IB/hfi1: Fix memory leak during unexpected shutdown")
Signed-off-by: Dean Luick <dean.luick@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Link: https://lore.kernel.org/r/167328548663.1472310.7871808081861622659.stgit@awfm-02.cornelisnetworks.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/user_exp_rcv.h')
-rw-r--r-- | drivers/infiniband/hw/hfi1/user_exp_rcv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/user_exp_rcv.h b/drivers/infiniband/hw/hfi1/user_exp_rcv.h index 8c53e416bf84..2ddb3dac7d91 100644 --- a/drivers/infiniband/hw/hfi1/user_exp_rcv.h +++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.h @@ -27,6 +27,7 @@ struct tid_user_buf { struct tid_rb_node { struct mmu_interval_notifier notifier; struct hfi1_filedata *fdata; + struct mutex invalidate_mutex; /* covers hw removal */ unsigned long phys; struct tid_group *grp; u32 rcventry; |