summaryrefslogtreecommitdiffstats
path: root/include/dt-bindings/gce/mt6779-gce.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2021-12-15 18:31:51 +0100
committerMike Snitzer <snitzer@redhat.com>2021-12-15 20:16:35 +0100
commit1cef171abd39102dcc862c6bfbf7f954f4f1f66f (patch)
treefc2b6b5387e4db7c4055e81d01e463ab2864d505 /include/dt-bindings/gce/mt6779-gce.h
parentdm btree remove: fix use after free in rebalance_children() (diff)
downloadlinux-1cef171abd39102dcc862c6bfbf7f954f4f1f66f.tar.xz
linux-1cef171abd39102dcc862c6bfbf7f954f4f1f66f.zip
dm integrity: fix data corruption due to improper use of bvec_kmap_local
Commit 25058d1c725c ("dm integrity: use bvec_kmap_local in __journal_read_write") didn't account for __journal_read_write() later adding the biovec's bv_offset. As such using bvec_kmap_local() caused the start of the biovec to be skipped. Trivial test that illustrates data corruption: # integritysetup format /dev/pmem0 # integritysetup open /dev/pmem0 integrityroot # mkfs.xfs /dev/mapper/integrityroot ... bad magic number bad magic number Metadata corruption detected at xfs_sb block 0x0/0x1000 libxfs_writebufr: write verifer failed on xfs_sb bno 0x0/0x1000 releasing dirty buffer (bulk) to free list! Fix this by using kmap_local_page() instead of bvec_kmap_local() in __journal_read_write(). Fixes: 25058d1c725c ("dm integrity: use bvec_kmap_local in __journal_read_write") Reported-by: Tony Asleson <tasleson@redhat.com> Reviewed-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'include/dt-bindings/gce/mt6779-gce.h')
0 files changed, 0 insertions, 0 deletions