[pnfs] bug in nfs4_put_session()

Benny Halevy bhalevy at panasas.com
Mon Jan 29 09:54:01 EST 2007


Hi Rahul,

There seems to be a bug in nfs4_put_session()
which should dereference "session" to set the referenced pointer to NULL.
Without the fix remounting the file system hits slab corruption and GPF...

Benny

Index: fs/nfs/nfs4proc.c
===================================================================
RCS file: /cvs/nfsv4/cvs/pnfs/fs/nfs/nfs4proc.c,v
retrieving revision 1.36
diff -d -u -p -r1.36 nfs4proc.c
--- fs/nfs/nfs4proc.c   27 Jan 2007 22:48:03 -0000      1.36
+++ fs/nfs/nfs4proc.c   29 Jan 2007 14:47:54 -0000
@@ -5371,7 +5371,7 @@ void nfs4_put_session(struct nfs4_sessio
 {
        if (atomic_dec_and_test(&((*session)->ref_count))) {
                nfs41_free_session(*session);
-               session = NULL;
+               *session = NULL;
        }
 }


More information about the pNFS mailing list