[CIFS] relinquish fscache cookie before freeing CIFSTconInfo
authorSteve French <sfrench@us.ibm.com>
Fri, 23 Jul 2010 20:37:53 +0000 (20:37 +0000)
committerSteve French <sfrench@us.ibm.com>
Mon, 2 Aug 2010 12:40:39 +0000 (12:40 +0000)
Doh, fix a use after free bug.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Reviewed-and-Tested-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c

index 52a7646cc7af5419f8e95dd1e16e41ae2904b3bb..d91a6085d55c6f4294006256564386bfa93635c0 100644 (file)
@@ -1845,8 +1845,8 @@ cifs_put_tcon(struct cifsTconInfo *tcon)
        CIFSSMBTDis(xid, tcon);
        _FreeXid(xid);
 
-       tconInfoFree(tcon);
        cifs_fscache_release_super_cookie(tcon);
+       tconInfoFree(tcon);
        cifs_put_smb_ses(ses);
 }