Patch "acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison)" has been added to the 4.10-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison)
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:
acpi-nfit-libnvdimm-fix-interleave-set-cookie-calculation-64-bit-comparison.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
b03b99a329a14b7302f37c3ea6da3848db41c8c5Mon Sep 17 00:00:00 2001
From: Dan Williams <[email protected]>
Date: Mon, 27 Mar 2017 21:53:38 -0700
Subject: acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison)
From: Dan Williams <[email protected]>
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.
--- drivers/acpi/nfit/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/acpi/nfit/core.c +5 -1
@@ -1617,7 +1617,11 @@ static int cmp_map(const void *m0, constconst struct nfit_set_info_map *map0 = m0;const struct nfit_set_info_map *map1 = m1; -return map0->region_offset - map1->region_offset; +if (map0->region_offset < map1->region_offset) +return -1 ; +else if (map0->region_offset > map1->region_offset) +return 1 ; +return 0 ; }/* Retrieve the nth entry referencing this spa */
Patches currently in stable-queue which might be from [email protected] are
queue-4.10/libnvdimm-band-aid-btt-vs-clear-poison-locking.patch queue-4.10/acpi-nfit-libnvdimm-fix-interleave-set-cookie-calculation-64-bit-comparison.patch queue-4.10/libnvdimm-fix-blk-free-space-accounting.patch queue-4.10/x86-pmem-fix-broken-__copy_user_nocache-cache-bypass-assumptions.patch queue-4.10/libnvdimm-fix-reconfig_mutex-mmap_sem-and-jbd2_handle-lockdep-splat.patch