[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] virtio-ccw: fix virtio_set_ind_atomic
From: |
Christian Borntraeger |
Subject: |
Re: [PATCH 1/2] virtio-ccw: fix virtio_set_ind_atomic |
Date: |
Mon, 6 Jul 2020 07:44:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 04.07.20 20:34, Michael S. Tsirkin wrote:
> On Tue, Jun 16, 2020 at 06:50:34AM +0200, Halil Pasic wrote:
>> The atomic_cmpxchg() loop is broken because we occasionally end up with
>> old and _old having different values (a legit compiler can generate code
>> that accessed *ind_addr again to pick up a value for _old instead of
>> using the value of old that was already fetched according to the
>> rules of the abstract machine). This means the underlying CS instruction
>> may use a different old (_old) than the one we intended to use if
>> atomic_cmpxchg() performed the xchg part.
>
> And was this ever observed in the field? Or is this a theoretical issue?
> commit log should probably say ...
It was observed in the field when the xml specified qemu instead of vhost.