DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: SebastianX Basierski <sebastianx.basierski@intel.com>, dev@dpdk.org
Cc: jianfeng.tan@intel.com, yliu@fridaylinux.org
Subject: Re: [dpdk-dev] [PATCH v2] net/virtio-user: fix unchecked return value
Date: Tue, 14 Nov 2017 10:43:53 +0100	[thread overview]
Message-ID: <f00f6e49-60c3-48d2-8998-140f3e55c177@redhat.com> (raw)
In-Reply-To: <1510651655-36160-1-git-send-email-sebastianx.basierski@intel.com>

Hi Sebastian,

On 11/14/2017 10:27 AM, SebastianX Basierski wrote:
> Report error message if clearing O_NONBLOCK flag will fail,
> then return from function.
> 
> ---
> v2:
> 	Patch title changed.
> ---

^^^^The above note should be placed just before diffstats to be removed
at apply time.

> Coverity issue: 143439
> 
> Fixes: ef53b6030039 ("net/virtio-user: support LSC")
> Cc: jianfeng.tan@intel.com
> Cc: yliu@fridaylinux.org
> cc: dev@dpdk.org
> 
> Signed-off-by: SebastianX Basierski <sebastianx.basierski@intel.com>
> Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
> ---

Here

>   drivers/net/virtio/virtio_user_ethdev.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
> index 7be57ce..c1f7a64 100644
> --- a/drivers/net/virtio/virtio_user_ethdev.c
> +++ b/drivers/net/virtio/virtio_user_ethdev.c
> @@ -109,7 +109,11 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
>   			} else {
>   				dev->status |= VIRTIO_NET_S_LINK_UP;
>   			}
> -			fcntl(dev->vhostfd, F_SETFL, flags & (~O_NONBLOCK));
> +			if (fcntl(dev->vhostfd, F_SETFL,
> +					flags & ~O_NONBLOCK) == -1) {
> +				PMD_DRV_LOG(ERR, "error clearing O_NONBLOCK flag");
> +				return;
> +			}
>   		}
>   		*(uint16_t *)dst = dev->status;
>   	}
> 

Other than that:
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

  reply	other threads:[~2017-11-14  9:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 13:38 [dpdk-dev] [PATCH] pmd_virtio: Unchecked return value from library SebastianX Basierski
2017-11-13 15:59 ` Tan, Jianfeng
2017-11-14  9:27 ` [dpdk-dev] [PATCH v2] net/virtio-user: fix unchecked return value SebastianX Basierski
2017-11-14  9:43   ` Maxime Coquelin [this message]
2017-11-14 10:39   ` [dpdk-dev] [PATCH v3] " SebastianX Basierski
2018-02-06 20:48     ` Thomas Monjalon

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=f00f6e49-60c3-48d2-8998-140f3e55c177@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=sebastianx.basierski@intel.com \
    --cc=yliu@fridaylinux.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).