From: Henrique Carvalho Date: Wed, 26 Nov 2025 13:55:53 +0000 (-0300) Subject: smb: client: fix incomplete backport in cfids_invalidation_worker() X-Git-Tag: v6.17.10~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd29b6e17a918fdd68352ce4813e167acc8727e;p=thirdparty%2Fkernel%2Fstable.git smb: client: fix incomplete backport in cfids_invalidation_worker() The previous commit bdb596ceb4b7 ("smb: client: fix potential UAF in smb2_close_cached_fid()") was an incomplete backport and missed one kref_put() call in cfids_invalidation_worker() that should have been converted to close_cached_dir(). Fixes: bdb596ceb4b7 ("smb: client: fix potential UAF in smb2_close_cached_fid()")" Signed-off-by: Henrique Carvalho Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 9c6cf3df5c79..a2336fc4f49e 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -755,7 +755,7 @@ static void cfids_invalidation_worker(struct work_struct *work) list_for_each_entry_safe(cfid, q, &entry, entry) { list_del(&cfid->entry); /* Drop the ref-count acquired in invalidate_all_cached_dirs */ - kref_put(&cfid->refcount, smb2_close_cached_fid); + close_cached_dir(cfid); } }