Patch "cifs: fix return of uninitialized rc in dfs_cache_update_tgthint()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cifs: fix return of uninitialized rc in dfs_cache_update_tgthint()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cifs-fix-return-of-uninitialized-rc-in-dfs_cache_upd.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 487398989aca371318e6087feee8eb1dbe02cbfe
Author: Paulo Alcantara <pc@xxxxxx>
Date:   Wed Jan 18 13:36:31 2023 -0300

    cifs: fix return of uninitialized rc in dfs_cache_update_tgthint()
    
    [ Upstream commit d6a49e8c4ca4d399ed65ac219585187fc8c2e2b1 ]
    
    Fix this by initializing rc to 0 as cache_refresh_path() would not set
    it in case of success.
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Link: https://lore.kernel.org/all/202301190004.bEHvbKG6-lkp@xxxxxxxxx/
    Signed-off-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 8c98fa507768..1864bdadf3dd 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -1050,10 +1050,10 @@ int dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses,
 			     const struct nls_table *cp, int remap, const char *path,
 			     const struct dfs_cache_tgt_iterator *it)
 {
-	int rc;
-	const char *npath;
-	struct cache_entry *ce;
 	struct cache_dfs_tgt *t;
+	struct cache_entry *ce;
+	const char *npath;
+	int rc = 0;
 
 	npath = dfs_cache_canonical_path(path, cp, remap);
 	if (IS_ERR(npath))



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux