summaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2022-06-23 14:53:25 -0400
committerMike Snitzer <snitzer@kernel.org>2022-06-23 14:55:43 -0400
commit90736eb3232d208ee048493f371075e4272e0944 (patch)
treea0b517d7e5c9a85495b58e9def970af84b669cc2 /lib/memory-notifier-error-inject.c
parent61b6e2e5321da281ab3c0c04e1962b3d000f6248 (diff)
downloadlwn-90736eb3232d208ee048493f371075e4272e0944.tar.gz
lwn-90736eb3232d208ee048493f371075e4272e0944.zip
dm mirror log: clear log bits up to BITS_PER_LONG boundary
Commit 85e123c27d5c ("dm mirror log: round up region bitmap size to BITS_PER_LONG") introduced a regression on 64-bit architectures in the lvm testsuite tests: lvcreate-mirror, mirror-names and vgsplit-operation. If the device is shrunk, we need to clear log bits beyond the end of the device. The code clears bits up to a 32-bit boundary and then calculates lc->sync_count by summing set bits up to a 64-bit boundary (the commit changed that; previously, this boundary was 32-bit too). So, it was using some non-zeroed bits in the calculation and this caused misbehavior. Fix this regression by clearing bits up to BITS_PER_LONG boundary. Fixes: 85e123c27d5c ("dm mirror log: round up region bitmap size to BITS_PER_LONG") Cc: stable@vger.kernel.org Reported-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions