From: Steve French Date: Fri, 23 Jul 2010 20:37:53 +0000 (+0000) Subject: [CIFS] relinquish fscache cookie before freeing CIFSTconInfo X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f841593ff65d2f801c7f80c4ed0955d30103f50;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [CIFS] relinquish fscache cookie before freeing CIFSTconInfo Doh, fix a use after free bug. Signed-off-by: Suresh Jayaraman Reviewed-and-Tested-by: Jeff Layton Signed-off-by: Steve French --- diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 52a7646cc7af..d91a6085d55c 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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); }