[openib-general] problem report: uninterruptible sleep in ib_uverbs

Michael S. Tsirkin mst at mellanox.co.il
Mon Jul 17 08:12:01 PDT 2006


Quoting r. Michael S. Tsirkin <mst at mellanox.co.il>:
> Subject: Re: problem report: uninterruptible sleep in ib_uverbs
> 
> Quoting r. Michael S. Tsirkin <mst at mellanox.co.il>:
> > Subject: problem report: uninterruptible sleep in ib_uverbs
> > 
> > Hi!
> > With recent git code, an application that allocated a huge number of PDs got
> > blocked during cleanup.
> 
> Sorry, that should have been: a huge number of SRQs.

Looks like uverbs_cmd didn't unlock PD in some error paths.
Comments?

--

uverbs_cmd: left some mutexes locked on error.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index bdf5d50..0371806 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1775,7 +1775,7 @@ ssize_t ib_uverbs_create_ah(struct ib_uv
 	ah = ib_create_ah(pd, &attr);
 	if (IS_ERR(ah)) {
 		ret = PTR_ERR(ah);
-		goto err;
+		goto err_put;
 	}
 
 	ah->uobject  = uobj;
@@ -1811,6 +1811,9 @@ err_copy:
 err_destroy:
 	ib_destroy_ah(ah);
 
+err_put:
+	put_pd_read(pd);
+
 err:
 	put_uobj_write(uobj);
 	return ret;
@@ -1984,7 +1987,7 @@ ssize_t ib_uverbs_create_srq(struct ib_u
 	srq = pd->device->create_srq(pd, &attr, &udata);
 	if (IS_ERR(srq)) {
 		ret = PTR_ERR(srq);
-		goto err;
+		goto err_put;
 	}
 
 	srq->device    	   = pd->device;
@@ -2029,6 +2032,9 @@ err_copy:
 err_destroy:
 	ib_destroy_srq(srq);
 
+err_put:
+	put_pd_read(pd);
+
 err:
 	put_uobj_write(&obj->uobject);
 	return ret;

-- 
MST




More information about the general mailing list