aboutsummaryrefslogtreecommitdiff
path: root/lib/net_utils.c
diff options
context:
space:
mode:
authorMikulas Patocka <[email protected]>2018-03-21 12:42:25 -0400
committerJens Axboe <[email protected]>2018-03-21 19:23:33 -0600
commit6e2fb22103b99c26ae30a46512abe75526d8e4c9 (patch)
treef885e365fbc63d0c87be61a6fd256d5df9a0761d /lib/net_utils.c
parent818e0fa293ca836eba515615c64680ea916fd7cd (diff)
block: use 32-bit blk_status_t on Alpha
Early alpha processors cannot write a single byte or word; they read 8 bytes, modify the value in registers and write back 8 bytes. The type blk_status_t is defined as one byte, it is often written asynchronously by I/O completion routines, this asynchronous modification can corrupt content of nearby bytes if these nearby bytes can be written simultaneously by another CPU. - one example of such corruption is the structure dm_io where "blk_status_t status" is written by an asynchronous completion routine and "atomic_t io_count" is modified synchronously - another example is the structure dm_buffer where "unsigned hold_count" is modified synchronously from process context and "blk_status_t write_error" is modified asynchronously from bio completion routine This patch fixes the bug by changing the type blk_status_t to 32 bits 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 <[email protected]> Cc: [email protected] # 4.13+ Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions