Skip to content
Commit e0c4a422 authored by Dean Luick's avatar Dean Luick Committed by Leon Romanovsky
Browse files

IB/hfi1: Fix expected receive setup error exit issues

Fix three error exit issues in expected receive setup.
Re-arrange error exits to increase readability.

Issues and fixes:
1. Possible missed page unpin if tidlist copyout fails and
   not all pinned pages where made part of a TID.
   Fix: Unpin the unused pages.

2. Return success with unset return values tidcnt and length
   when no pages were pinned.
   Fix: Return -ENOSPC if no pages were pinned.

3. Return success with unset return values tidcnt and length when
   no rcvarray entries available.
   Fix: Return -ENOSPC if no rcvarray entries are available.

Fixes: 7e7a436e ("staging/hfi1: Add TID entry program function body")
Fixes: 97736f36 ("IB/hfi1: Validate page aligned for a given virtual addres")
Fixes: f404ca4c

 ("IB/hfi1: Refactor hfi_user_exp_rcv_setup() IOCTL")
Signed-off-by: default avatarDean Luick <dean.luick@cornelisnetworks.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Link: https://lore.kernel.org/r/167328548150.1472310.1492305874804187634.stgit@awfm-02.cornelisnetworks.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent ecf91551
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