From: "Basierski, SebastianX" <sebastianx.basierski@intel.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
"'skhare@vmware.com'" <skhare@vmware.com>
Cc: "'dev@dpdk.org'" <dev@dpdk.org>,
"Jain, Deepak K" <deepak.k.jain@intel.com>
Subject: Re: [dpdk-dev] [PATCH] pmd_virtio: Unchecked return value from library
Date: Mon, 16 Oct 2017 08:32:23 +0000 [thread overview]
Message-ID: <3A7E81AC661B4646A4CE6F2E09B7B74E4BBC3F@HASMSX106.ger.corp.intel.com> (raw)
In-Reply-To: <3A7E81AC661B4646A4CE6F2E09B7B74E4BAA2B@HASMSX106.ger.corp.intel.com>
-----Original Message-----
From: Basierski, SebastianX
Sent: Friday, September 29, 2017 9:44 AM
To: Tan, Jianfeng <jianfeng.tan@intel.com>; skhare@vmware.com
Cc: dev@dpdk.org
Subject: RE: [PATCH] pmd_virtio: Unchecked return value from library
-----Original Message-----
From: Tan, Jianfeng
Sent: Wednesday, September 20, 2017 2:56 AM
To: Basierski, SebastianX <sebastianx.basierski@intel.com>; skhare@vmware.com
Cc: dev@dpdk.org
Subject: RE: [PATCH] pmd_virtio: Unchecked return value from library
Hi,
Thank you for those fixes.
> -----Original Message-----
> From: Basierski, SebastianX
> Sent: Tuesday, September 19, 2017 7:47 PM
> To: skhare@vmware.com
> Cc: Basierski, SebastianX; Tan, Jianfeng; dev@dpdk.org
> Subject: [PATCH] pmd_virtio: Unchecked return value from library
>
> Check return value from library in order to prevent potential fail.
>
> Coverity issue: 143439
>
> Fixes: ef53b6030039 ("net/virtio-user: support LSC")
> Cc: jianfeng.tan@intel.com
> cc: dev@dpdk.org
>
> Signed-off-by: SebastianX Basierski <sebastianx.basierski@intel.com>
> ---
> drivers/net/virtio/virtio_user_ethdev.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_user_ethdev.c
> b/drivers/net/virtio/virtio_user_ethdev.c
> index c961444..16aa350 100644
> --- a/drivers/net/virtio/virtio_user_ethdev.c
> +++ b/drivers/net/virtio/virtio_user_ethdev.c
> @@ -86,7 +86,10 @@ virtio_user_read_dev_config(struct virtio_hw *hw,
> size_t offset,
> int flags;
>
> flags = fcntl(dev->vhostfd, F_GETFL);
> - fcntl(dev->vhostfd, F_SETFL, flags | O_NONBLOCK);
> + if (fcntl(dev->vhostfd, F_SETFL,
> + flags | O_NONBLOCK) == -1)
> + return;
Actually, even it fails, I still prefer to continue instead of "return" here. Maybe, we can report an error message here.
Thanks,
Jianfeng
Hi Jianfeng,
I'like to continue with the task.
So please let me know if You are certain with Your option:
continue instead of return (and add error report), despite possibility of returning error from fcntl.
Regards,
Sebastian Basierski
Hi,
I understand You may be busy, but I really have to finish my task.
Please let me know, what is Your decision about patch.
Regards,
Sebastian Basierski
next prev parent reply other threads:[~2017-10-16 8:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 11:47 SebastianX Basierski
2017-09-20 0:56 ` Tan, Jianfeng
2017-09-20 9:17 ` Basierski, SebastianX
2017-09-29 7:44 ` Basierski, SebastianX
2017-10-16 8:32 ` Basierski, SebastianX [this message]
2017-10-16 14:51 ` Tan, Jianfeng
[not found] ` <1508821844-37372-1-git-send-email-sebastianx.basierski@intel.com>
2017-10-24 5:10 ` [dpdk-dev] [PATCH v2] Report an error message if the flag O_NONBLOCK setting fails, then return from function SebastianX Basierski
2017-10-24 7:26 ` Tan, Jianfeng
2017-10-24 8:17 ` [dpdk-dev] [PATCH v3] net/virtio: fix unchecked return value SebastianX Basierski
2017-10-24 8:40 ` Yuanhan Liu
2017-10-24 8:20 ` SebastianX Basierski
2017-11-13 13:38 [dpdk-dev] [PATCH] pmd_virtio: Unchecked return value from library SebastianX Basierski
2017-11-13 15:59 ` Tan, Jianfeng
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=3A7E81AC661B4646A4CE6F2E09B7B74E4BBC3F@HASMSX106.ger.corp.intel.com \
--to=sebastianx.basierski@intel.com \
--cc=deepak.k.jain@intel.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=skhare@vmware.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
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).