On 10/2/19 7:49 AM, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > RDMA has weak connection between PIDs and HW objects, because > the latter tied to file descriptors for their lifetime management. > > The outcome of such connection is that for the following scenario, > the returned PID will be 0 (not-valid): > 1. Create FD and context > 2. Share it with ephemeral child > 3. Create any object and exit that child > > This flow was revealed in testing environment and of course real users > are not running such scenario, because it makes no sense at all in RDMA > world. > > Let's do two changes in the code to support such workflow anyway: > 1. Remove need to provide PID/kernel name. Code already supports it, > just need to remove extra validation. > 2. Ball-out in case PID is 0. > > Link: https://lore.kernel.org/linux-rdma/20191002123245.18153-2-leon@xxxxxxxxxx > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > --- > rdma/res-cmid.c | 5 +---- > rdma/res-cq.c | 5 +---- > rdma/res-mr.c | 5 +---- > rdma/res-pd.c | 5 +---- > rdma/res-qp.c | 5 +---- > rdma/res.c | 3 +++ > 6 files changed, 8 insertions(+), 20 deletions(-) > applied to iproute2-next