Commit d9d0674c authored by Artemy Kovalyov's avatar Artemy Kovalyov Committed by Doug Ledford

IB/umem: Indicate that process is being terminated

When process is killed while pagefault operation still in progress -
function will fail. In this specific case we don't want any warnings in
dmesg to avoid log analyzers false alerts. So we need distinct error
code for this case.
Signed-off-by: default avatarArtemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d07d1d70
...@@ -573,7 +573,8 @@ static int ib_umem_odp_map_dma_single_page( ...@@ -573,7 +573,8 @@ static int ib_umem_odp_map_dma_single_page(
* for failure. * for failure.
* An -EAGAIN error code is returned when a concurrent mmu notifier prevents * An -EAGAIN error code is returned when a concurrent mmu notifier prevents
* the function from completing its task. * the function from completing its task.
* * An -ENOENT error code indicates that userspace process is being terminated
* and mm was already destroyed.
* @umem: the umem to map and pin * @umem: the umem to map and pin
* @user_virt: the address from which we need to map. * @user_virt: the address from which we need to map.
* @bcnt: the minimal number of bytes to pin and map. The mapping might be * @bcnt: the minimal number of bytes to pin and map. The mapping might be
...@@ -621,7 +622,7 @@ int ib_umem_odp_map_dma_pages(struct ib_umem *umem, u64 user_virt, u64 bcnt, ...@@ -621,7 +622,7 @@ int ib_umem_odp_map_dma_pages(struct ib_umem *umem, u64 user_virt, u64 bcnt,
owning_mm = get_task_mm(owning_process); owning_mm = get_task_mm(owning_process);
if (owning_mm == NULL) { if (owning_mm == NULL) {
ret = -EINVAL; ret = -ENOENT;
goto out_put_task; goto out_put_task;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment