Re: [PATCH] IB: fix task hanging on error recovery

Roland Dreier
2012-11-05T17:51:24Z

On Fri, Oct 19, 2012 at 2:58 PM, Kleber Sacilotto de Souza
<klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
> void rdma_addr_unregister_client(struct rdma_addr_client *client)
> {
> put_client(client);
> - wait_for_completion(&client->comp);
> + wait_for_completion_timeout(&client->comp, 5*HZ);
> }
> EXPORT_SYMBOL(rdma_addr_unregister_client);

This type of change looks pretty risky to me. Aren't we just letting
things continue with a potential use-after-free hanging around?

Where does 5 seconds as a timeout come from? Can we be confident that
nothing will complete client->comp after 5 seconds?