DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Adrian Moreno <amorenoz@redhat.com>, dev@dpdk.org
Cc: yinan.wang@intel.com, patrick.fu@intel.com, chenbo.xia@intel.com,
	zhihong.wang@intel.com
Subject: Re: [dpdk-dev] [PATCH v3 3/6] net/virtio-user: ignore result if STATUS is unsupported
Date: Wed, 28 Oct 2020 10:39:29 +0100
Message-ID: <49cedde9-4f40-0fb0-e32b-7284dcbfc8f9@redhat.com> (raw)
In-Reply-To: <20201026163930.94032-4-amorenoz@redhat.com>



On 10/26/20 5:39 PM, Adrian Moreno wrote:
> GET/SET STATUS is an optional feature, so it may not be negotiated. In
> that case, the VIRTIO_GET_STATUS call will not update the status (given
> as a pointer argument). Failing to identify this case would lead to
> undefined behavior as the device status will be updated with the value
> of a stack-allocated variable.
> 
> To fix this, return ENOTSUP if the feature is not supported and, in that
> case, don't update device status.
> 
> Fixes: 44102e6298e7 ("net/virtio: check protocol feature in user backend")
> Cc: maxime.coquelin@redhat.com
> Cc stable@dpdk.org
> 
> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
> ---
>  drivers/net/virtio/virtio_user/vhost_user.c   |  4 +--
>  .../net/virtio/virtio_user/virtio_user_dev.c  | 28 +++++++++----------
>  2 files changed, 15 insertions(+), 17 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2020-10-28  9:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 16:39 [dpdk-dev] [PATCH v3 0/6] net/virtio-user: fix server mode Adrian Moreno
2020-10-26 16:39 ` [dpdk-dev] [PATCH v3 1/6] net/virtio-user: fix backend selection if stat fails Adrian Moreno
2020-10-26 16:39 ` [dpdk-dev] [PATCH v3 2/6] net/virtio-user: don't set/get_status until FEATURES_OK Adrian Moreno
2020-10-26 16:39 ` [dpdk-dev] [PATCH v3 3/6] net/virtio-user: ignore result if STATUS is unsupported Adrian Moreno
2020-10-28  9:39   ` Maxime Coquelin [this message]
2020-10-26 16:39 ` [dpdk-dev] [PATCH v3 4/6] net/virtio-user: lock-protect status updates Adrian Moreno
2020-10-28 10:35   ` Maxime Coquelin
2020-10-26 16:39 ` [dpdk-dev] [PATCH v3 5/6] net/virtio-user: don't assume vhost status feature Adrian Moreno
2020-10-28 10:37   ` Maxime Coquelin
2020-10-26 16:39 ` [dpdk-dev] [PATCH v3 6/6] net/virtio-user: set status on socket reconnect Adrian Moreno
2020-10-28 11:01   ` Maxime Coquelin
2020-10-27  3:09 ` [dpdk-dev] [PATCH v3 0/6] net/virtio-user: fix server mode Jiang, YuX
2020-10-29  8:27 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49cedde9-4f40-0fb0-e32b-7284dcbfc8f9@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=patrick.fu@intel.com \
    --cc=yinan.wang@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git