[dm-devel] [PATCH] dm: fix race condition on Alpha

Hannes Reinecke hare at suse.de
Tue Mar 29 05:45:21 UTC 2022


On 3/28/22 18:34, Mikulas Patocka wrote:
> 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.
> 
Errm.

Seeing that those alphas could only modify 64 bit atomically, what 
exactly do you gain by using 32-bit flags?
Shouldn't you be using 64-bit flags?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the dm-devel mailing list