diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2018-05-29 14:14:06 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-06-01 17:16:58 +0200 |
commit | 7fc8ff267d8a94964626b847a0440b6feef9dd68 (patch) | |
tree | 7ae69340fa99d6403b1f071efeccca6883046a7b /drivers/infiniband/hw | |
parent | RDMA/mlx5: Don't check return value of zap_vma_ptes() (diff) | |
download | linux-7fc8ff267d8a94964626b847a0440b6feef9dd68.tar.xz linux-7fc8ff267d8a94964626b847a0440b6feef9dd68.zip |
RDMA/mlx4: Don't crash machine if zap_vma_ptes() fails
The failure reported by zap_vma_ptes() means that wrong VMA pages
were supplied, however it is impossible for this type of address.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 1fea1497263b..722c825e3e71 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -1186,7 +1186,6 @@ static const struct vm_operations_struct mlx4_ib_vm_ops = { static void mlx4_ib_disassociate_ucontext(struct ib_ucontext *ibcontext) { int i; - int ret = 0; struct vm_area_struct *vma; struct mlx4_ib_ucontext *context = to_mucontext(ibcontext); @@ -1198,13 +1197,8 @@ static void mlx4_ib_disassociate_ucontext(struct ib_ucontext *ibcontext) if (!vma) continue; - ret = zap_vma_ptes(context->hw_bar_info[i].vma, - context->hw_bar_info[i].vma->vm_start, - PAGE_SIZE); - if (ret) { - pr_err("Error: zap_vma_ptes failed for index=%d, ret=%d\n", i, ret); - BUG_ON(1); - } + zap_vma_ptes(context->hw_bar_info[i].vma, + context->hw_bar_info[i].vma->vm_start, PAGE_SIZE); context->hw_bar_info[i].vma->vm_flags &= ~(VM_SHARED | VM_MAYSHARE); |