From: "Chuck Lever" Subject: Re: rpc.idmapd oops with latest NFS bits from your web site Date: Mon, 14 Aug 2006 21:36:53 -0400 Message-ID: <76bd70e30608141836m791e76beh6dd2ecaa5be806ab@mail.gmail.com> References: <76bd70e30608101221se9d6fb6l8bb50e93109c7a5b@mail.gmail.com> <1155238502.5826.2.camel@localhost> <76bd70e30608101245w45779d6u7ef99d790c726d31@mail.gmail.com> <1155246274.5826.64.camel@localhost> <76bd70e30608110734g619ad245u464a840c89e9dce9@mail.gmail.com> <1155576415.5664.98.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Linux NFS Mailing List Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2-new.sourceforge.net with esmtp (Exim 4.43) id 1GCnrT-0005so-Fm for nfs@lists.sourceforge.net; Mon, 14 Aug 2006 18:36:55 -0700 Received: from nf-out-0910.google.com ([64.233.182.186]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1GCnrT-0005GI-HK for nfs@lists.sourceforge.net; Mon, 14 Aug 2006 18:36:56 -0700 Received: by nf-out-0910.google.com with SMTP id l36so132211nfa for ; Mon, 14 Aug 2006 18:36:53 -0700 (PDT) To: "Trond Myklebust" In-Reply-To: <1155576415.5664.98.camel@localhost> List-Id: "Discussion of NFS under Linux development, interoperability, and testing." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfs-bounces@lists.sourceforge.net Errors-To: nfs-bounces@lists.sourceforge.net On 8/14/06, Trond Myklebust wrote: > On Fri, 2006-08-11 at 10:34 -0400, Chuck Lever wrote: > > On 8/10/06, Trond Myklebust wrote: > > > On Thu, 2006-08-10 at 15:45 -0400, Chuck Lever wrote: > > > > Yeah. I'd say something is overwriting i_cdev with garbarge. Then > > > > __fput sees that i_cdev is not NULL and tries to call cdev_put with a > > > > bogus address. > > > > > > Looks like something is calling fput() on a file pointing to an inode > > > that has already been freed. 6b6b6b6b is the mark of the poisoned slab > > > entry. > > > > > > Hmm.... Does the attached patch fix it for you? > > > > Unfortunately, no. Exact same symptoms. > > OK. I think I've nailed it now. Please try the following patch, which > has been merged into the NFS git tree... Yes, this one seems stable. > ---------- Forwarded message ---------- > From: Trond Myklebust > To: > Date: Mon, 14 Aug 2006 13:26:26 -0400 > Subject: No Subject > rpc_unlink() and rpc_rmdir() will dput the dentry reference for you. > > Signed-off-by: Trond Myklebust > --- > > fs/nfs/idmap.c | 1 - > net/sunrpc/auth_gss/auth_gss.c | 1 - > net/sunrpc/clnt.c | 15 ++++++--------- > 3 files changed, 6 insertions(+), 11 deletions(-) > > diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c > index df0be12..07a5dd5 100644 > --- a/fs/nfs/idmap.c > +++ b/fs/nfs/idmap.c > @@ -131,7 +131,6 @@ nfs_idmap_delete(struct nfs4_client *clp > if (!idmap) > return; > rpc_unlink(idmap->idmap_dentry); > - dput(idmap->idmap_dentry); > clp->cl_idmap = NULL; > kfree(idmap); > } > diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c > index beaa7b8..ef1cf5b 100644 > --- a/net/sunrpc/auth_gss/auth_gss.c > +++ b/net/sunrpc/auth_gss/auth_gss.c > @@ -719,7 +719,6 @@ gss_destroy(struct rpc_auth *auth) > > gss_auth = container_of(auth, struct gss_auth, rpc_auth); > rpc_unlink(gss_auth->dentry); > - dput(gss_auth->dentry); > gss_auth->dentry = NULL; > gss_mech_put(gss_auth->mech); > > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c > index d307556..d9eac70 100644 > --- a/net/sunrpc/clnt.c > +++ b/net/sunrpc/clnt.c > @@ -184,7 +184,6 @@ rpc_new_client(struct rpc_xprt *xprt, ch > out_no_auth: > if (!IS_ERR(clnt->cl_dentry)) { > rpc_rmdir(clnt->cl_dentry); > - dput(clnt->cl_dentry); > rpc_put_mount(); > } > out_no_path: > @@ -251,10 +250,8 @@ rpc_clone_client(struct rpc_clnt *clnt) > new->cl_autobind = 0; > new->cl_oneshot = 0; > new->cl_dead = 0; > - if (!IS_ERR(new->cl_dentry)) { > + if (!IS_ERR(new->cl_dentry)) > dget(new->cl_dentry); > - rpc_get_mount(); > - } > rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); > if (new->cl_auth) > atomic_inc(&new->cl_auth->au_count); > @@ -317,11 +314,15 @@ rpc_destroy_client(struct rpc_clnt *clnt > clnt->cl_auth = NULL; > } > if (clnt->cl_parent != clnt) { > + if (!IS_ERR(clnt->cl_dentry)) > + dput(clnt->cl_dentry); > rpc_destroy_client(clnt->cl_parent); > goto out_free; > } > - if (!IS_ERR(clnt->cl_dentry)) > + if (!IS_ERR(clnt->cl_dentry)) { > rpc_rmdir(clnt->cl_dentry); > + rpc_put_mount(); > + } > if (clnt->cl_xprt) { > xprt_destroy(clnt->cl_xprt); > clnt->cl_xprt = NULL; > @@ -331,10 +332,6 @@ rpc_destroy_client(struct rpc_clnt *clnt > out_free: > rpc_free_iostats(clnt->cl_metrics); > clnt->cl_metrics = NULL; > - if (!IS_ERR(clnt->cl_dentry)) { > - dput(clnt->cl_dentry); > - rpc_put_mount(); > - } > kfree(clnt); > return 0; > } > > > -- "We who cut mere stones must always be envisioning cathedrals" -- Quarry worker's creed ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs