mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
Fix full_name_hash() behaviour when length is a multiple of 8
We want it to match what hash_name() is doing, which means extra multiply by 9 in this case... Reported-and-Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ba331d5dec
commit
f132c5be05
1 changed files with 1 additions and 1 deletions
|
@ -1439,10 +1439,10 @@ unsigned int full_name_hash(const unsigned char *name, unsigned int len)
|
|||
|
||||
for (;;) {
|
||||
a = *(unsigned long *)name;
|
||||
hash *= 9;
|
||||
if (len < sizeof(unsigned long))
|
||||
break;
|
||||
hash += a;
|
||||
hash *= 9;
|
||||
name += sizeof(unsigned long);
|
||||
len -= sizeof(unsigned long);
|
||||
if (!len)
|
||||
|
|
Loading…
Reference in a new issue