diff options
| author | Jason Gunthorpe <[email protected]> | 2019-04-16 11:07:28 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2019-04-24 16:32:25 +0000 |
| commit | 67f269b37f9b4d52c5e7f97acea26c0852e9b8a1 (patch) | |
| tree | 58f359e2dca30490e6962ae1c1933f05dab97a97 /lib/dynamic_debug.c | |
| parent | RDMA/mlx5: Use rdma_user_map_io for mapping BAR pages (diff) | |
| download | kernel-67f269b37f9b4d52c5e7f97acea26c0852e9b8a1.tar.gz kernel-67f269b37f9b4d52c5e7f97acea26c0852e9b8a1.zip | |
RDMA/ucontext: Fix regression with disassociate
When this code was consolidated the intention was that the VMA would
become backed by anonymous zero pages after the zap_vma_pte - however this
very subtly relied on setting the vm_ops = NULL and clearing the VM_SHARED
bits to transform the VMA into an anonymous VMA. Since the vm_ops was
removed this broke.
Now userspace gets a SIGBUS if it touches the vma after disassociation.
Instead of converting the VMA to anonymous provide a fault handler that
puts a zero'd page into the VMA when user-space touches it after
disassociation.
Cc: [email protected]
Suggested-by: Andrea Arcangeli <[email protected]>
Fixes: 5f9794dc94f5 ("RDMA/ucontext: Add a core API for mmaping driver IO memory")
Signed-off-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions
