> -----Original Message----- > From: Guoqing Jiang <guoqing.jiang@xxxxxxxxx> > Sent: Monday, October 9, 2023 9:18 AM > To: Bernard Metzler <BMT@xxxxxxxxxxxxxx>; jgg@xxxxxxxx; leon@xxxxxxxxxx > Cc: linux-rdma@xxxxxxxxxxxxxxx > Subject: [EXTERNAL] [PATCH 07/19] RDMA/siw: Also goto out_sem_up if > pin_user_pages returns 0 > > Since it is legitimate for pin_user_pages returns 0, which > means it might be dead loop here. > > Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxx> > --- > drivers/infiniband/sw/siw/siw_mem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/sw/siw/siw_mem.c > b/drivers/infiniband/sw/siw/siw_mem.c > index c5f7f1669d09..92c5776a9eed 100644 > --- a/drivers/infiniband/sw/siw/siw_mem.c > +++ b/drivers/infiniband/sw/siw/siw_mem.c > @@ -423,7 +423,7 @@ struct siw_umem *siw_umem_get(u64 start, u64 len, bool > writable) > while (nents) { > rv = pin_user_pages(first_page_va, nents, foll_flags, > plist); > - if (rv < 0) > + if (rv <= 0) > goto out_sem_up; > > umem->num_pages += rv; > -- > 2.35.3 Okay, looks right. hw/qib/qib_user_pages.c and hw/usnic/usnic_uiom.c should be checked in that respect as well. Adding Dennis and Christian as maintainers of those. Acked-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>