public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* Confused about BUG_ON in rpcb_getport_async
@ 2008-08-12  2:27 Neil Brown
       [not found] ` <18592.62730.840231.108375-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2008-08-12  2:27 UTC (permalink / raw)
  To: linux-nfs


Hi 
 I have a report of a the BUG_ON in rpcb_getport_clnt being
 triggered.  This is:
	/* Autobind on cloned rpc clients is discouraged */
	BUG_ON(clnt->cl_parent != clnt);

 It looks to me that while they might be discouraged, they are not
 prevented and so having the BUG_ON is wrong.

 When rpc_clone_client creates a clone, it sets cl_autobind to 0,
 and gives the new client a reference to the same cl_xprt as the
 original client.

 The only effect of cl_autobind is to prevent rpc_force_rebind from
 clearing the BOUND flag on ->cl_xprt.
 So while a call to rpc_force_rebind on the clone will not clear that
 flag, a call on the original client will clear that flag.

 So a cloned client can still end up with a ->cl_xprt with the BOUND
 flag clear.

 So call_bind (which is present in the call trace under the oops) can
 find that !xprt_bound, even when the client is a cloned client.

 When this happens, ->rpcbind, which is rpcb_getport_clnt, goes BOOM.

 What should happen when a clone client finds that its transport is no
 longer bound?  Should rpc_getport_async just do
    clnt = task->tk_client->cl_parent;
 ??

Perplexed,
NeilBrown

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-14  2:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-12  2:27 Confused about BUG_ON in rpcb_getport_async Neil Brown
     [not found] ` <18592.62730.840231.108375-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-08-12 20:32   ` Trond Myklebust
2008-08-13 23:45     ` Neil Brown
     [not found]       ` <18595.29231.61262.220929-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-08-14  0:10         ` Trond Myklebust
2008-08-14  2:26           ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox