On Fri, 18 Jan 2008 16:43:45 -0500
"J. Bruce Fields" <[EMAIL PROTECTED]> wrote:

> On Mon, Jan 14, 2008 at 09:05:18AM -0500, Jeff Layton wrote:
> > If we're shutting down all the nlm_hosts anyway, then it doesn't
> > make sense to allow RPC calls to linger. Allowing them to do so can
> > mean that the RPC calls can outlive the currently running lockd and
> > can lead to a use after free situation.
> 
> I assume that all new rpc calls are created by the lockd thread itself
> (which also calls nlm_shutdown_hosts(), which guarantees that there
> can't be someone about to make an rpc call using the clnt we're
> destroying here?
> 

I believe that's correct.

> By the way, any idea what the nlm_shutdown_hosts() call in exit_nlm()
> is doing?
> 

Before this patchset, it was possible for more than one lockd
to be up at a time, and I suppose there could have been races that
would cause both to exit without ever calling nlm_shutdown_hosts.

With this patchset, we may be able to remove that. I suspect that it's
probably a noop now. That said, even after spending a fair bit of time
in this code, I'm not entirely comfortable with it. I suggest that we
take the incremental approach to lockd changes unless someone here is
sure :-).

Cheers,
-- 
Jeff Layton <[EMAIL PROTECTED]>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to