]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison)
authorDan Williams <dan.j.williams@intel.com>
Tue, 28 Mar 2017 04:53:38 +0000 (21:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Apr 2017 07:32:38 +0000 (09:32 +0200)
commit122c16ccc71b9db339fd94a638695b7c00aea066
tree6d7e81f90ff7ed67ba83e639f29c412071469599
parent083d30d61a1aef4d28c7d6b273430de20e1c1efe
acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison)

commit b03b99a329a14b7302f37c3ea6da3848db41c8c5 upstream.

While reviewing the -stable patch for commit 86ef58a4e35e "nfit,
libnvdimm: fix interleave set cookie calculation" Ben noted:

    "This is returning an int, thus it's effectively doing a 32-bit
     comparison and not the 64-bit comparison you say is needed."

Update the compare operation to be immune to this integer demotion problem.

Cc: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
Fixes: 86ef58a4e35e ("nfit, libnvdimm: fix interleave set cookie calculation")
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/nfit/core.c