summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/security
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2024-09-05 21:27:25 +0300
committerMikulas Patocka <mpatocka@redhat.com>2024-09-06 13:38:16 +0300
commitf8e1ca92e35e9041cc0a1bc226ef07a853a22de4 (patch)
tree2b95f92bb36523a38f786b473b924bb6b1141521 /Documentation/devicetree/bindings/security
parentfaada2174c08662ae98b439c69efe3e79382c538 (diff)
downloadlinux-f8e1ca92e35e9041cc0a1bc226ef07a853a22de4.tar.xz
dm-integrity: fix a race condition when accessing recalc_sector
There's a race condition when accessing the variable ic->sb->recalc_sector. The function integrity_recalc writes to this variable when it makes some progress and the function dm_integrity_map_continue may read this variable concurrently. One problem is that on 32-bit architectures the 64-bit variable is not read and written atomically - it may be possible to read garbage if read races with write. Another problem is that memory accesses to this variable are not guarded with memory barriers. This commit fixes the race - it moves reading ic->sb->recalc_sector to an earlier place where we hold &ic->endio_wait.lock. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'Documentation/devicetree/bindings/security')
0 files changed, 0 insertions, 0 deletions