diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2022-03-28 18:34:31 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-04-01 19:19:27 +0200 |
commit | aad5b23ebf21573a32b6f07644f028d64492a5d6 (patch) | |
tree | 5d8699cc392668209a04c5d69da17f91ba67fd41 /lib/memregion.c | |
parent | dm integrity: set journal entry unused when shrinking device (diff) | |
download | linux-aad5b23ebf21573a32b6f07644f028d64492a5d6.tar.xz linux-aad5b23ebf21573a32b6f07644f028d64492a5d6.zip |
dm: fix dm_io and dm_target_io flags race condition on Alpha
Early alpha processors cannot write a single byte or short; they read 8
bytes, modify the value in registers and write back 8 bytes.
This could cause race condition in the structure dm_io - if the fields
flags and io_count are modified simultaneously.
Fix this bug by using 32-bit flags if we are on Alpha and if we are
compiling for a processor that doesn't have the byte-word-extension.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: bd4a6dd241ae ("dm: reduce size of dm_io and dm_target_io structs")
[snitzer: Jens allowed this change since Mikulas owns a relevant Alpha!]
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'lib/memregion.c')
0 files changed, 0 insertions, 0 deletions