]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/umem: Do not use current->tgid to track the mm_struct
authorJason Gunthorpe <jgg@mellanox.com>
Sun, 16 Sep 2018 17:44:45 +0000 (20:44 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Sep 2018 20:19:30 +0000 (16:19 -0400)
commit13af47d662aeec9a6693d824ebe73340e9ad3e0c
tree7ac48fd0e16c8b61fcab634e46e84738a10d3649
parent4e93d69a368302b73729f80760667d2d1883aac8
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>
drivers/infiniband/core/umem.c
include/rdma/ib_umem.h