Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f12f98db authored by Jeff Layton's avatar Jeff Layton Committed by Steve French
Browse files

cifs: fix length calculation for converted unicode readdir names

cifs_from_ucs2 returns the length of the converted name, including the
length of the NULL terminator. We don't want to include the NULL
terminator in the dentry name length however since that'll throw off the
hash calculation for the dentry cache.

I believe that this is the root cause of several problems that have
cropped up recently that seem to be papered over with the "noserverino"
mount option. More confirmation of that would be good, but this is
clearly a bug and it fixes at least one reproducible problem that
was reported.

This patch fixes at least this reproducer in this kernel.org bug:

    http://bugzilla.kernel.org/show_bug.cgi?id=15088#c12



Reported-by: default avatarBjorn Tore Sund <bjorn.sund@it.uib.no>
Acked-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Cc: stable@kernel.org
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent dfae0acd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment