DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
@ 2019-04-10  2:44 Chenbo Xia
  2019-04-10  2:44 ` Chenbo Xia
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Chenbo Xia @ 2019-04-10  2:44 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, tiwei.bie, zhihong.wang, stable

Fix unchecked return value for fcntl.

Coverity issue: 277210
Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 827a48ad6..4b74bd2d8 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -394,7 +394,10 @@ virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
 		return -1;
 
 	flag = fcntl(fd, F_GETFL);
-	fcntl(fd, F_SETFL, flag | O_NONBLOCK);
+	if (fcntl(fd, F_SETFL, flag | O_NONBLOCK) < 0) {
+		PMD_DRV_LOG(ERR, "fcntl failed, %s", strerror(errno));
+		return -1;
+	}
 
 	return 0;
 }
-- 
2.17.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-10  2:44 [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check Chenbo Xia
@ 2019-04-10  2:44 ` Chenbo Xia
  2019-04-10  4:37 ` Rami Rosen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Chenbo Xia @ 2019-04-10  2:44 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, tiwei.bie, zhihong.wang, stable

Fix unchecked return value for fcntl.

Coverity issue: 277210
Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 827a48ad6..4b74bd2d8 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -394,7 +394,10 @@ virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
 		return -1;
 
 	flag = fcntl(fd, F_GETFL);
-	fcntl(fd, F_SETFL, flag | O_NONBLOCK);
+	if (fcntl(fd, F_SETFL, flag | O_NONBLOCK) < 0) {
+		PMD_DRV_LOG(ERR, "fcntl failed, %s", strerror(errno));
+		return -1;
+	}
 
 	return 0;
 }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-10  2:44 [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check Chenbo Xia
  2019-04-10  2:44 ` Chenbo Xia
@ 2019-04-10  4:37 ` Rami Rosen
  2019-04-10  4:37   ` Rami Rosen
  2019-04-10 15:18 ` Jens Freimann
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Rami Rosen @ 2019-04-10  4:37 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: dev, Maxime Coquelin, Tiwei Bie, Zhihong Wang, stable

Fix unchecked return value for fcntl.

Coverity issue: 277210
Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
---

Acked-by: Rami Rosen <ramirose@gmail.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-10  4:37 ` Rami Rosen
@ 2019-04-10  4:37   ` Rami Rosen
  0 siblings, 0 replies; 13+ messages in thread
From: Rami Rosen @ 2019-04-10  4:37 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: dev, Maxime Coquelin, Tiwei Bie, Zhihong Wang, stable

Fix unchecked return value for fcntl.

Coverity issue: 277210
Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
---

Acked-by: Rami Rosen <ramirose@gmail.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-10  2:44 [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check Chenbo Xia
  2019-04-10  2:44 ` Chenbo Xia
  2019-04-10  4:37 ` Rami Rosen
@ 2019-04-10 15:18 ` Jens Freimann
  2019-04-10 15:18   ` Jens Freimann
  2019-04-12  4:16 ` Tiwei Bie
  2019-04-17  7:56 ` Maxime Coquelin
  4 siblings, 1 reply; 13+ messages in thread
From: Jens Freimann @ 2019-04-10 15:18 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: dev, maxime.coquelin, tiwei.bie, zhihong.wang, stable

On Wed, Apr 10, 2019 at 02:44:05AM +0000, Chenbo Xia wrote:
>Fix unchecked return value for fcntl.
>
>Coverity issue: 277210
>Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
>Cc: stable@dpdk.org
>
>Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
>---
> drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>

Reviewed-by: Jens Freimann <jfreimann@redhat.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-10 15:18 ` Jens Freimann
@ 2019-04-10 15:18   ` Jens Freimann
  0 siblings, 0 replies; 13+ messages in thread
From: Jens Freimann @ 2019-04-10 15:18 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: dev, maxime.coquelin, tiwei.bie, zhihong.wang, stable

On Wed, Apr 10, 2019 at 02:44:05AM +0000, Chenbo Xia wrote:
>Fix unchecked return value for fcntl.
>
>Coverity issue: 277210
>Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
>Cc: stable@dpdk.org
>
>Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
>---
> drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>

Reviewed-by: Jens Freimann <jfreimann@redhat.com>



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-10  2:44 [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check Chenbo Xia
                   ` (2 preceding siblings ...)
  2019-04-10 15:18 ` Jens Freimann
@ 2019-04-12  4:16 ` Tiwei Bie
  2019-04-12  4:16   ` Tiwei Bie
  2019-04-17  7:56 ` Maxime Coquelin
  4 siblings, 1 reply; 13+ messages in thread
From: Tiwei Bie @ 2019-04-12  4:16 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: dev, maxime.coquelin, zhihong.wang, stable

On Wed, Apr 10, 2019 at 02:44:05AM +0000, Chenbo Xia wrote:
> Fix unchecked return value for fcntl.
> 
> Coverity issue: 277210
> Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
> ---
>  drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-12  4:16 ` Tiwei Bie
@ 2019-04-12  4:16   ` Tiwei Bie
  0 siblings, 0 replies; 13+ messages in thread
From: Tiwei Bie @ 2019-04-12  4:16 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: dev, maxime.coquelin, zhihong.wang, stable

On Wed, Apr 10, 2019 at 02:44:05AM +0000, Chenbo Xia wrote:
> Fix unchecked return value for fcntl.
> 
> Coverity issue: 277210
> Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
> ---
>  drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-10  2:44 [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check Chenbo Xia
                   ` (3 preceding siblings ...)
  2019-04-12  4:16 ` Tiwei Bie
@ 2019-04-17  7:56 ` Maxime Coquelin
  2019-04-17  7:56   ` Maxime Coquelin
  4 siblings, 1 reply; 13+ messages in thread
From: Maxime Coquelin @ 2019-04-17  7:56 UTC (permalink / raw)
  To: Chenbo Xia, dev; +Cc: tiwei.bie, zhihong.wang, stable



On 4/10/19 4:44 AM, Chenbo Xia wrote:
> Fix unchecked return value for fcntl.
> 
> Coverity issue: 277210
> Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
> Cc:stable@dpdk.org
> 
> Signed-off-by: Chenbo Xia<chenbo.xia@intel.com>
> ---
>   drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)


Applied to dpdk-next-virtio/master.

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2019-04-17  7:56 ` Maxime Coquelin
@ 2019-04-17  7:56   ` Maxime Coquelin
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Coquelin @ 2019-04-17  7:56 UTC (permalink / raw)
  To: Chenbo Xia, dev; +Cc: tiwei.bie, zhihong.wang, stable



On 4/10/19 4:44 AM, Chenbo Xia wrote:
> Fix unchecked return value for fcntl.
> 
> Coverity issue: 277210
> Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
> Cc:stable@dpdk.org
> 
> Signed-off-by: Chenbo Xia<chenbo.xia@intel.com>
> ---
>   drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)


Applied to dpdk-next-virtio/master.

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2020-07-29 13:12 Chenbo Xia
  2020-07-29 14:22 ` Maxime Coquelin
@ 2020-07-29 14:54 ` Maxime Coquelin
  1 sibling, 0 replies; 13+ messages in thread
From: Maxime Coquelin @ 2020-07-29 14:54 UTC (permalink / raw)
  To: Chenbo Xia, dev; +Cc: zhihong.wang, stable



On 7/29/20 3:12 PM, Chenbo Xia wrote:
> Setting the flags of tapfd may fail and the return value
> should be checked.
> 
> Coverity issue: 140739
> Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
> ---
>  drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
Applied to dpdk-next-virtio/master.

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
  2020-07-29 13:12 Chenbo Xia
@ 2020-07-29 14:22 ` Maxime Coquelin
  2020-07-29 14:54 ` Maxime Coquelin
  1 sibling, 0 replies; 13+ messages in thread
From: Maxime Coquelin @ 2020-07-29 14:22 UTC (permalink / raw)
  To: Chenbo Xia, dev; +Cc: zhihong.wang, stable



On 7/29/20 3:12 PM, Chenbo Xia wrote:
> Setting the flags of tapfd may fail and the return value
> should be checked.
> 
> Coverity issue: 140739
> Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
> ---
>  drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
> index 2fa4f0d66..acddefa33 100644
> --- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
> +++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
> @@ -128,7 +128,10 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
>  		goto error;
>  	}
>  
> -	fcntl(tapfd, F_SETFL, O_NONBLOCK);
> +	if (fcntl(tapfd, F_SETFL, O_NONBLOCK) < 0) {
> +		PMD_DRV_LOG(ERR, "fcntl tapfd failed: %s", strerror(errno));
> +		goto error;
> +	}
>  
>  	if (ioctl(tapfd, TUNSETVNETHDRSZ, &hdr_size) < 0) {
>  		PMD_DRV_LOG(ERR, "TUNSETVNETHDRSZ failed: %s", strerror(errno));
> 

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

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check
@ 2020-07-29 13:12 Chenbo Xia
  2020-07-29 14:22 ` Maxime Coquelin
  2020-07-29 14:54 ` Maxime Coquelin
  0 siblings, 2 replies; 13+ messages in thread
From: Chenbo Xia @ 2020-07-29 13:12 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, zhihong.wang, stable

Setting the flags of tapfd may fail and the return value
should be checked.

Coverity issue: 140739
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index 2fa4f0d66..acddefa33 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -128,7 +128,10 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 		goto error;
 	}
 
-	fcntl(tapfd, F_SETFL, O_NONBLOCK);
+	if (fcntl(tapfd, F_SETFL, O_NONBLOCK) < 0) {
+		PMD_DRV_LOG(ERR, "fcntl tapfd failed: %s", strerror(errno));
+		goto error;
+	}
 
 	if (ioctl(tapfd, TUNSETVNETHDRSZ, &hdr_size) < 0) {
 		PMD_DRV_LOG(ERR, "TUNSETVNETHDRSZ failed: %s", strerror(errno));
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-07-29 14:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10  2:44 [dpdk-dev] [PATCH v1] net/virtio-user: fix return value check Chenbo Xia
2019-04-10  2:44 ` Chenbo Xia
2019-04-10  4:37 ` Rami Rosen
2019-04-10  4:37   ` Rami Rosen
2019-04-10 15:18 ` Jens Freimann
2019-04-10 15:18   ` Jens Freimann
2019-04-12  4:16 ` Tiwei Bie
2019-04-12  4:16   ` Tiwei Bie
2019-04-17  7:56 ` Maxime Coquelin
2019-04-17  7:56   ` Maxime Coquelin
2020-07-29 13:12 Chenbo Xia
2020-07-29 14:22 ` Maxime Coquelin
2020-07-29 14:54 ` Maxime Coquelin

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).