[dpdk-stable] [PATCH v3 1/3] net/virtio: add missing barrier before reading the flags
Maxime Coquelin
maxime.coquelin at redhat.com
Thu Jan 10 15:31:01 CET 2019
On 1/9/19 3:50 PM, Ilya Maximets wrote:
> Reading the used->flags could be reordered with avail->idx update.
> vhost in kernel disables notifications for the time of packets
> receiving, like this:
>
> 1. disable notify
> 2. process packets
> 3. enable notify
> 4. has more packets ? goto 1
>
> In case of reordering, virtio driver could read the flags on
> step 2 while notifications disabled and update avail->idx after
> the step 4, i.e. vhost will exit the loop on step 4 with
> notifications enabled, but virtio will not notify.
>
> Fixes: c1f86306a026 ("virtio: add new driver")
> CC: stable at dpdk.org
>
> Reported-by: Shahaf Shuler <shahafs at mellanox.com>
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> ---
> drivers/net/virtio/virtqueue.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the stable
mailing list