linux/include
Alexander Duyck 6c380a76dc jhash: Update jhash_[321]words functions to use correct initval
commit 2e7056c433 upstream.

Looking over the implementation for jhash2 and comparing it to jhash_3words
I realized that the two hashes were in fact very different.  Doing a bit of
digging led me to "The new jhash implementation" in which lookup2 was
supposed to have been replaced with lookup3.

In reviewing the patch I noticed that jhash2 had originally initialized a
and b to JHASH_GOLDENRATIO and c to initval, but after the patch a, b, and
c were initialized to initval + (length << 2) + JHASH_INITVAL.  However the
changes in jhash_3words simply replaced the initialization of a and b with
JHASH_INITVAL.

This change corrects what I believe was an oversight so that a, b, and c in
jhash_3words all have the same value added consisting of initval + (length
<< 2) + JHASH_INITVAL so that jhash2 and jhash_3words will now produce the
same hash result given the same inputs.

Fixes: 60d509c823 ("The new jhash implementation")
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2015-05-06 11:33:04 +01:00
..
acpi ACPICA: Add new GPE public interface - acpi_mark_gpe_for_wake. 2015-01-16 14:34:51 +00:00
asm-generic nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 10:24:18 +01:00
clocksource drivers: clocksource: add support for ARM architected timer event stream 2013-09-26 09:48:00 +01:00
crypto crypto: hash - Add real ahash walk interface 2014-05-21 20:56:12 +08:00
drm drm/i915/bdw: PCI IDs ending in 0xb are ULT. 2015-04-10 10:03:51 +01:00
dt-bindings pinctrl: dra: dt-bindings: Fix output pull up/down 2014-11-27 11:22:05 +00:00
keys KEYS: Separate the kernel signature checking keyring from module signing 2013-09-25 17:17:01 +01:00
kvm ARM: KVM: fix non-VGIC compilation 2014-03-06 09:47:42 +01:00
linux jhash: Update jhash_[321]words functions to use correct initval 2015-05-06 11:33:04 +01:00
math-emu math-emu: fix floating-point to integer overflow detection 2014-01-07 18:36:24 -06:00
media media: vb2: fix VBI/poll regression 2014-10-09 12:23:49 -07:00
memory ddr: add LPDDR2 data from JESD209-2 2012-05-02 00:04:06 -07:00
misc [media] altera-stapl: it is time to move out from staging 2011-09-23 15:00:57 -03:00
net ipv6: protect skb->sk accesses from recursive dereference inside the stack 2015-04-27 09:48:14 +01:00
pcmcia pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate 2013-03-15 12:26:03 -07:00
ras edac: add support for error type "Info" 2013-02-21 14:16:27 -03:00
rdma Merge branches 'core', 'cxgb3', 'cxgb4', 'iser', 'iwpm', 'misc', 'mlx4', 'mlx5', 'noio', 'ocrdma', 'qib', 'srp' and 'usnic' into for-next 2014-06-10 10:12:14 -07:00
rxrpc atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
scsi scsi: do not issue SCSI RSOC command to Promise Vtrak E610f 2014-09-17 09:22:00 -07:00
sound ALSA: ak411x: Fix stall in work callback 2015-02-10 13:38:44 +00:00
target target: Fix COMPARE_AND_WRITE with SG_TO_MEM_NOALLOC handling 2015-05-06 10:24:23 +01:00
trace regmap: introduce regmap_name to fix syscon regmap trace events 2015-04-10 10:03:57 +01:00
uapi powerpc: add little endian flag to syscall_get_arch() 2015-02-10 13:38:43 +00:00
video Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-06-12 11:32:30 -07:00
xen Fix BUG when trying to expand the grant table. This seems to occur 2014-07-30 09:00:20 -07:00
Kbuild UAPI: remove empty Kbuild files 2013-04-30 17:04:09 -07:00