]> git.hungrycats.org Git - linux/commit
dm-verity: make error counter atomic
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 9 Jul 2026 19:37:38 +0000 (21:37 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Fri, 10 Jul 2026 12:42:33 +0000 (14:42 +0200)
commit8ec4d9c5a5cf4b61fc087f871465b1f79b393325
tree13f5b9258cf64f48db5bab90009038bcf03d29ae
parent88dd117c92a142253fb7a17e791773902b3babc6
dm-verity: make error counter atomic

The error counter "v->corrupted_errs" was not atomic, thus it could be
subject to race conditions. The call to
dm_audit_log_target("max-corrupted-errors") may be skipped due to the
races.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-4.6
Fixes: 65ff5b7ddf05 ("dm verity: add error handling modes for corrupted blocks")
Cc: stable@vger.kernel.org
drivers/md/dm-verity-target.c
drivers/md/dm-verity.h