ACK: [SRU][F:linux-bluefield][PATCH v2 1/1] UBUNTU: SAUCE: tmfifo: Fix a memory barrier issue

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Thu May 6 11:36:05 UTC 2021


On 05/05/2021 15:06, Liming Sun wrote:
> From: Liming Sun <lsun at mellanox.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1927262
> 
> The virtio framework uses wmb() when updating avail->idx. It
> gurantees the write order, but not necessarily loading order
> for the code accessing the memory. This commit adds a load barrier
> after reading the avail->idx to make sure all the data in the
> descriptor is visible. It also adds a barrier when returning the
> packet to virtio framework to make sure read/writes are visible to
> the virtio code.
> 
> Signed-off-by: Liming Sun <limings at nvidia.com>
> ---
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com>


Best regards,
Krzysztof



More information about the kernel-team mailing list