aboutsummaryrefslogtreecommitdiff
path: root/include/rdma
diff options
context:
space:
mode:
authorJason Gunthorpe2018-09-16 20:44:45 +0300
committerDoug Ledford2018-09-20 16:19:30 -0400
commitd4b4dd1b9706e48c370f88d3adfe713e43423cc9 (patch)
tree7ac48fd0e16c8b61fcab634e46e84738a10d3649 /include/rdma
parentce92db1ca84de2ebc5be7a81a68f2e220799fcf5 (diff)
RDMA/umem: Do not use current->tgid to track the mm_struct
This is just wrong, the process that calls into the reg_mr is the process associated with the umem, and that does not have to be the same process that created the context. When this code was first written mmgrab() didn't exist, however these days we can just directly hold the mm_struct pointer in the umem and have no ambiguity when it comes to releasing the umem as to which mm it was associated with. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_umem.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
index a1fd63871d17..e1c00b2ead19 100644
--- a/include/rdma/ib_umem.h
+++ b/include/rdma/ib_umem.h
@@ -42,14 +42,13 @@ struct ib_umem_odp;
struct ib_umem {
struct ib_ucontext *context;
+ struct mm_struct *owning_mm;
size_t length;
unsigned long address;
int page_shift;
int writable;
int hugetlb;
struct work_struct work;
- struct mm_struct *mm;
- unsigned long diff;
struct ib_umem_odp *odp_data;
struct sg_table sg_head;
int nmap;