[openib-general] [PATCH] for 2-6-19 rdma/addr: use client registration to fix module unload race
Sean Hefty
mshefty at ichips.intel.com
Tue Oct 31 10:57:27 PST 2006
Roland Dreier wrote:
> > @@ -305,6 +330,7 @@ int rdma_resolve_ip(struct sockaddr *src
> > break;
> > default:
> > ret = req->status;
> > + atomic_dec(&client->refcount);
> > kfree(req);
> > break;
> > }
>
> Doesn't this need to be deref_client() here too? Or is there some
> reason why this can't be the last reference to the client?
This can't be the last reference. For this to be the last reference on the
client, the user would have to call rdma_addr_unregister_client() at the same
time they call rdma_resolve_ip(), which can't work anyway.
> (BTW, I really find the "deref" name confusing -- it makes me think of
> dereferencing a pointer, rather than putting a reference. I would use
> put_client() instead)
That's easy to change.
- Sean
More information about the general
mailing list