[CIFS] relinquish fscache cookie before freeing CIFSTconInfo
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>
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 52a7646..d91a608 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1845,8 +1845,8 @@
CIFSSMBTDis(xid, tcon);
_FreeXid(xid);
- tconInfoFree(tcon);
cifs_fscache_release_super_cookie(tcon);
+ tconInfoFree(tcon);
cifs_put_smb_ses(ses);
}