Patch "Fix match_prepath()" has been added to the 4.10-stable tree
This is a note to let you know that I've just added the patch titled
Fix match_prepath()
to the 4.10-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:
fix-match_prepath.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
cd8c42968ee651b69e00f8661caff32b0086e82dMon Sep 17 00:00:00 2001
From: Sachin Prabhu <[email protected]>
Date: Wed, 26 Apr 2017 14:05:46 +0100
Subject: Fix match_prepath()
From: Sachin Prabhu <[email protected]>
commit cd8c42968ee651b69e00f8661caff32b0086e82d upstream.
Incorrect return value for shares not using the prefix path means that we will never match superblocks for these shares.
--- fs/cifs/connect.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
fs/cifs/connect.c +6 -8
@@ -2879,16 +2879,14 @@ match_prepath(struct super_block *sb, st {struct cifs_sb_info *old =CIFS_SB (sb);struct cifs_sb_info *new = mnt_data->cifs_sb; +bool old_set = old->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH ; +bool new_set = new->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH ; -if (old->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH ) { -if (!(new->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH )) -return 0 ; -/* The prepath should be null terminated strings */ -if (strcmp (new->prepath, old->prepath)) -return 0 ; - +if (old_set && new_set && !strcmp (new->prepath, old->prepath)) +return 1 ; +else if (!old_set && !new_set)return 1 ; - } +return 0 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.10/fix-match_prepath.patch