Skip to content

Commit d9d0674

Browse files
Artemy-Mellanoxdledford
authored andcommitted
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: Artemy Kovalyov <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent d07d1d7 commit d9d0674

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/infiniband/core/umem_odp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,8 @@ static int ib_umem_odp_map_dma_single_page(
573573
* for failure.
574574
* An -EAGAIN error code is returned when a concurrent mmu notifier prevents
575575
* the function from completing its task.
576-
*
576+
* An -ENOENT error code indicates that userspace process is being terminated
577+
* and mm was already destroyed.
577578
* @umem: the umem to map and pin
578579
* @user_virt: the address from which we need to map.
579580
* @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,
621622

622623
owning_mm = get_task_mm(owning_process);
623624
if (owning_mm == NULL) {
624-
ret = -EINVAL;
625+
ret = -ENOENT;
625626
goto out_put_task;
626627
}
627628

0 commit comments

Comments
 (0)