All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Coverity fixes
@ 2019-02-15 16:25 ` Paul Durrant
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Paul Durrant, Anthony Perard, Kevin Wolf, Max Reitz,
	Stefan Hajnoczi, Stefano Stabellini

Paul Durrant (3):
  dataplane/xen-block: remove dead code
  xen-block: remove redundant assignment
  xen-block: report error condition from vbd_name_to_disk()

 hw/block/dataplane/xen-block.c |  5 +----
 hw/block/xen-block.c           | 24 ++++++++++++++++--------
 2 files changed, 17 insertions(+), 12 deletions(-)
---
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
-- 
2.20.1.2.gb21ebb6

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

* [PATCH 0/3] Coverity fixes
@ 2019-02-15 16:25 ` Paul Durrant
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Kevin Wolf, Stefano Stabellini, Max Reitz, Paul Durrant,
	Stefan Hajnoczi, Anthony Perard

Paul Durrant (3):
  dataplane/xen-block: remove dead code
  xen-block: remove redundant assignment
  xen-block: report error condition from vbd_name_to_disk()

 hw/block/dataplane/xen-block.c |  5 +----
 hw/block/xen-block.c           | 24 ++++++++++++++++--------
 2 files changed, 17 insertions(+), 12 deletions(-)
---
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
-- 
2.20.1.2.gb21ebb6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code
  2019-02-15 16:25 ` Paul Durrant
@ 2019-02-15 16:25   ` Paul Durrant
  -1 siblings, 0 replies; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Paul Durrant, Peter Maydell, Stefan Hajnoczi, Stefano Stabellini,
	Anthony Perard, Kevin Wolf, Max Reitz

The if() statement is clearly bogus (dead code which should have been
cleaned up when grant mapping was removed).

Spotted by Coverity: CID 1398635

While in the neighbourhood, add a missing 'fall through' annotation.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
---
 hw/block/dataplane/xen-block.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c
index c6a15da024..f1523c5b45 100644
--- a/hw/block/dataplane/xen-block.c
+++ b/hw/block/dataplane/xen-block.c
@@ -281,10 +281,6 @@ static void xen_block_complete_aio(void *opaque, int ret)
         break;
     case BLKIF_OP_WRITE:
     case BLKIF_OP_FLUSH_DISKCACHE:
-        if (!request->req.nr_segments) {
-            break;
-        }
-        break;
     default:
         break;
     }
@@ -298,6 +294,7 @@ static void xen_block_complete_aio(void *opaque, int ret)
         if (!request->req.nr_segments) {
             break;
         }
+        /* fall through */
     case BLKIF_OP_READ:
         if (request->status == BLKIF_RSP_OKAY) {
             block_acct_done(blk_get_stats(dataplane->blk), &request->acct);
-- 
2.20.1.2.gb21ebb6

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

* [PATCH 1/3] dataplane/xen-block: remove dead code
@ 2019-02-15 16:25   ` Paul Durrant
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, Max Reitz,
	Paul Durrant, Stefan Hajnoczi, Anthony Perard

The if() statement is clearly bogus (dead code which should have been
cleaned up when grant mapping was removed).

Spotted by Coverity: CID 1398635

While in the neighbourhood, add a missing 'fall through' annotation.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
---
 hw/block/dataplane/xen-block.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c
index c6a15da024..f1523c5b45 100644
--- a/hw/block/dataplane/xen-block.c
+++ b/hw/block/dataplane/xen-block.c
@@ -281,10 +281,6 @@ static void xen_block_complete_aio(void *opaque, int ret)
         break;
     case BLKIF_OP_WRITE:
     case BLKIF_OP_FLUSH_DISKCACHE:
-        if (!request->req.nr_segments) {
-            break;
-        }
-        break;
     default:
         break;
     }
@@ -298,6 +294,7 @@ static void xen_block_complete_aio(void *opaque, int ret)
         if (!request->req.nr_segments) {
             break;
         }
+        /* fall through */
     case BLKIF_OP_READ:
         if (request->status == BLKIF_RSP_OKAY) {
             block_acct_done(blk_get_stats(dataplane->blk), &request->acct);
-- 
2.20.1.2.gb21ebb6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Qemu-devel] [PATCH 2/3] xen-block: remove redundant assignment
  2019-02-15 16:25 ` Paul Durrant
                   ` (2 preceding siblings ...)
  (?)
@ 2019-02-15 16:25 ` Paul Durrant
  2019-02-18 14:43     ` Anthony PERARD
  -1 siblings, 1 reply; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Paul Durrant, Peter Maydell, Stefano Stabellini, Anthony Perard,
	Kevin Wolf, Max Reitz

The assignment to 'p' is unnecessary as the code will either goto 'invalid'
or p will get overwritten.

Spotted by Coverity: CID 1398638

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
---
 hw/block/xen-block.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 5012af9cb6..29afe2703a 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -413,8 +413,7 @@ static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
         }
 
         if (*end == 'p') {
-            p = (char *) ++end;
-            if (*end == '\0') {
+            if (*(++end) == '\0') {
                 goto invalid;
             }
         }
-- 
2.20.1.2.gb21ebb6

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

* [PATCH 2/3] xen-block: remove redundant assignment
  2019-02-15 16:25 ` Paul Durrant
  (?)
  (?)
@ 2019-02-15 16:25 ` Paul Durrant
  -1 siblings, 0 replies; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, Max Reitz,
	Paul Durrant, Anthony Perard

The assignment to 'p' is unnecessary as the code will either goto 'invalid'
or p will get overwritten.

Spotted by Coverity: CID 1398638

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
---
 hw/block/xen-block.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 5012af9cb6..29afe2703a 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -413,8 +413,7 @@ static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
         }
 
         if (*end == 'p') {
-            p = (char *) ++end;
-            if (*end == '\0') {
+            if (*(++end) == '\0') {
                 goto invalid;
             }
         }
-- 
2.20.1.2.gb21ebb6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Qemu-devel] [PATCH 3/3] xen-block: report error condition from vbd_name_to_disk()
  2019-02-15 16:25 ` Paul Durrant
@ 2019-02-15 16:25   ` Paul Durrant
  -1 siblings, 0 replies; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Paul Durrant, Peter Maydell, Stefano Stabellini, Anthony Perard,
	Kevin Wolf, Max Reitz

The function needs to make sure it is passed a valid disk name. This is
easily done by making sure that the parsing loop results in a non-zero
value.

Spotted by Coverity: CID 1398640

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
---
 hw/block/xen-block.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 29afe2703a..37a456c207 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -351,21 +351,28 @@ static void xen_block_get_vdev(Object *obj, Visitor *v, const char *name,
     g_free(str);
 }
 
-static unsigned int vbd_name_to_disk(const char *name, const char **endp)
+static int vbd_name_to_disk(const char *name, const char **endp,
+                            unsigned long *disk)
 {
-    unsigned int disk = 0;
+    unsigned int n = 0;
 
     while (*name != '\0') {
         if (!g_ascii_isalpha(*name) || !g_ascii_islower(*name)) {
             break;
         }
 
-        disk *= 26;
-        disk += *name++ - 'a' + 1;
+        n *= 26;
+        n += *name++ - 'a' + 1;
     }
     *endp = name;
 
-    return disk - 1;
+    if (!n) {
+        return -1;
+    }
+
+    *disk = n - 1;
+
+    return 0;
 }
 
 static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
@@ -418,7 +425,9 @@ static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
             }
         }
     } else {
-        vdev->disk = vbd_name_to_disk(p, &end);
+        if (vbd_name_to_disk(p, &end, &vdev->disk)) {
+            goto invalid;
+        }
     }
 
     if (*end != '\0') {
-- 
2.20.1.2.gb21ebb6

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

* [PATCH 3/3] xen-block: report error condition from vbd_name_to_disk()
@ 2019-02-15 16:25   ` Paul Durrant
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Durrant @ 2019-02-15 16:25 UTC (permalink / raw)
  To: qemu-devel, qemu-block, xen-devel
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, Max Reitz,
	Paul Durrant, Anthony Perard

The function needs to make sure it is passed a valid disk name. This is
easily done by making sure that the parsing loop results in a non-zero
value.

Spotted by Coverity: CID 1398640

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
---
 hw/block/xen-block.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 29afe2703a..37a456c207 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -351,21 +351,28 @@ static void xen_block_get_vdev(Object *obj, Visitor *v, const char *name,
     g_free(str);
 }
 
-static unsigned int vbd_name_to_disk(const char *name, const char **endp)
+static int vbd_name_to_disk(const char *name, const char **endp,
+                            unsigned long *disk)
 {
-    unsigned int disk = 0;
+    unsigned int n = 0;
 
     while (*name != '\0') {
         if (!g_ascii_isalpha(*name) || !g_ascii_islower(*name)) {
             break;
         }
 
-        disk *= 26;
-        disk += *name++ - 'a' + 1;
+        n *= 26;
+        n += *name++ - 'a' + 1;
     }
     *endp = name;
 
-    return disk - 1;
+    if (!n) {
+        return -1;
+    }
+
+    *disk = n - 1;
+
+    return 0;
 }
 
 static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
@@ -418,7 +425,9 @@ static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
             }
         }
     } else {
-        vdev->disk = vbd_name_to_disk(p, &end);
+        if (vbd_name_to_disk(p, &end, &vdev->disk)) {
+            goto invalid;
+        }
     }
 
     if (*end != '\0') {
-- 
2.20.1.2.gb21ebb6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code
  2019-02-15 16:25   ` Paul Durrant
  (?)
@ 2019-02-15 20:38   ` Philippe Mathieu-Daudé
  2019-02-18 14:27       ` Anthony PERARD
  -1 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-15 20:38 UTC (permalink / raw)
  To: Paul Durrant, qemu-devel, qemu-block, xen-devel
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, Max Reitz,
	Stefan Hajnoczi, Anthony Perard

On 2/15/19 5:25 PM, Paul Durrant wrote:
> The if() statement is clearly bogus (dead code which should have been
> cleaned up when grant mapping was removed).

"... was removed in 06454c24ad)."

> 
> Spotted by Coverity: CID 1398635
> 
> While in the neighbourhood, add a missing 'fall through' annotation.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> ---
>  hw/block/dataplane/xen-block.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c
> index c6a15da024..f1523c5b45 100644
> --- a/hw/block/dataplane/xen-block.c
> +++ b/hw/block/dataplane/xen-block.c
> @@ -281,10 +281,6 @@ static void xen_block_complete_aio(void *opaque, int ret)
>          break;
>      case BLKIF_OP_WRITE:
>      case BLKIF_OP_FLUSH_DISKCACHE:
> -        if (!request->req.nr_segments) {
> -            break;
> -        }
> -        break;
>      default:
>          break;
>      }
> @@ -298,6 +294,7 @@ static void xen_block_complete_aio(void *opaque, int ret)
>          if (!request->req.nr_segments) {
>              break;
>          }
> +        /* fall through */
>      case BLKIF_OP_READ:
>          if (request->status == BLKIF_RSP_OKAY) {
>              block_acct_done(blk_get_stats(dataplane->blk), &request->acct);
> 

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

* Re: [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code
  2019-02-15 16:25   ` Paul Durrant
  (?)
  (?)
@ 2019-02-15 20:38   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-15 20:38 UTC (permalink / raw)
  To: Paul Durrant, qemu-devel, qemu-block, xen-devel
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, Max Reitz,
	Stefan Hajnoczi, Anthony Perard

On 2/15/19 5:25 PM, Paul Durrant wrote:
> The if() statement is clearly bogus (dead code which should have been
> cleaned up when grant mapping was removed).

"... was removed in 06454c24ad)."

> 
> Spotted by Coverity: CID 1398635
> 
> While in the neighbourhood, add a missing 'fall through' annotation.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> ---
>  hw/block/dataplane/xen-block.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c
> index c6a15da024..f1523c5b45 100644
> --- a/hw/block/dataplane/xen-block.c
> +++ b/hw/block/dataplane/xen-block.c
> @@ -281,10 +281,6 @@ static void xen_block_complete_aio(void *opaque, int ret)
>          break;
>      case BLKIF_OP_WRITE:
>      case BLKIF_OP_FLUSH_DISKCACHE:
> -        if (!request->req.nr_segments) {
> -            break;
> -        }
> -        break;
>      default:
>          break;
>      }
> @@ -298,6 +294,7 @@ static void xen_block_complete_aio(void *opaque, int ret)
>          if (!request->req.nr_segments) {
>              break;
>          }
> +        /* fall through */
>      case BLKIF_OP_READ:
>          if (request->status == BLKIF_RSP_OKAY) {
>              block_acct_done(blk_get_stats(dataplane->blk), &request->acct);
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code
  2019-02-15 20:38   ` [Qemu-devel] " Philippe Mathieu-Daudé
@ 2019-02-18 14:27       ` Anthony PERARD
  0 siblings, 0 replies; 16+ messages in thread
From: Anthony PERARD @ 2019-02-18 14:27 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Paul Durrant, qemu-devel, qemu-block, xen-devel, Kevin Wolf,
	Peter Maydell, Stefano Stabellini, Max Reitz, Stefan Hajnoczi

On Fri, Feb 15, 2019 at 09:38:59PM +0100, Philippe Mathieu-Daudé wrote:
> On 2/15/19 5:25 PM, Paul Durrant wrote:
> > The if() statement is clearly bogus (dead code which should have been
> > cleaned up when grant mapping was removed).
> 
> "... was removed in 06454c24ad)."

Actually, it looks like c6025bd197 should have remove the if statement.

> > 
> > Spotted by Coverity: CID 1398635
> > 
> > While in the neighbourhood, add a missing 'fall through' annotation.
> > 
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

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

* Re: [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code
@ 2019-02-18 14:27       ` Anthony PERARD
  0 siblings, 0 replies; 16+ messages in thread
From: Anthony PERARD @ 2019-02-18 14:27 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, qemu-block,
	qemu-devel, Max Reitz, Paul Durrant, Stefan Hajnoczi, xen-devel

On Fri, Feb 15, 2019 at 09:38:59PM +0100, Philippe Mathieu-Daudé wrote:
> On 2/15/19 5:25 PM, Paul Durrant wrote:
> > The if() statement is clearly bogus (dead code which should have been
> > cleaned up when grant mapping was removed).
> 
> "... was removed in 06454c24ad)."

Actually, it looks like c6025bd197 should have remove the if statement.

> > 
> > Spotted by Coverity: CID 1398635
> > 
> > While in the neighbourhood, add a missing 'fall through' annotation.
> > 
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Qemu-devel] [PATCH 2/3] xen-block: remove redundant assignment
  2019-02-15 16:25 ` [Qemu-devel] " Paul Durrant
@ 2019-02-18 14:43     ` Anthony PERARD
  0 siblings, 0 replies; 16+ messages in thread
From: Anthony PERARD @ 2019-02-18 14:43 UTC (permalink / raw)
  To: Paul Durrant
  Cc: qemu-devel, qemu-block, xen-devel, Peter Maydell,
	Stefano Stabellini, Kevin Wolf, Max Reitz

On Fri, Feb 15, 2019 at 04:25:32PM +0000, Paul Durrant wrote:
> The assignment to 'p' is unnecessary as the code will either goto 'invalid'
> or p will get overwritten.
> 
> Spotted by Coverity: CID 1398638
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

-- 
Anthony PERARD

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

* Re: [PATCH 2/3] xen-block: remove redundant assignment
@ 2019-02-18 14:43     ` Anthony PERARD
  0 siblings, 0 replies; 16+ messages in thread
From: Anthony PERARD @ 2019-02-18 14:43 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, qemu-block,
	qemu-devel, Max Reitz, xen-devel

On Fri, Feb 15, 2019 at 04:25:32PM +0000, Paul Durrant wrote:
> The assignment to 'p' is unnecessary as the code will either goto 'invalid'
> or p will get overwritten.
> 
> Spotted by Coverity: CID 1398638
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Qemu-devel] [PATCH 3/3] xen-block: report error condition from vbd_name_to_disk()
  2019-02-15 16:25   ` Paul Durrant
  (?)
@ 2019-02-18 15:43   ` Anthony PERARD
  -1 siblings, 0 replies; 16+ messages in thread
From: Anthony PERARD @ 2019-02-18 15:43 UTC (permalink / raw)
  To: Paul Durrant
  Cc: qemu-devel, qemu-block, xen-devel, Peter Maydell,
	Stefano Stabellini, Kevin Wolf, Max Reitz

On Fri, Feb 15, 2019 at 04:25:33PM +0000, Paul Durrant wrote:
> The function needs to make sure it is passed a valid disk name. This is
> easily done by making sure that the parsing loop results in a non-zero
> value.
> 
> Spotted by Coverity: CID 1398640
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

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

* Re: [PATCH 3/3] xen-block: report error condition from vbd_name_to_disk()
  2019-02-15 16:25   ` Paul Durrant
  (?)
  (?)
@ 2019-02-18 15:43   ` Anthony PERARD
  -1 siblings, 0 replies; 16+ messages in thread
From: Anthony PERARD @ 2019-02-18 15:43 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Kevin Wolf, Peter Maydell, Stefano Stabellini, qemu-block,
	qemu-devel, Max Reitz, xen-devel

On Fri, Feb 15, 2019 at 04:25:33PM +0000, Paul Durrant wrote:
> The function needs to make sure it is passed a valid disk name. This is
> easily done by making sure that the parsing loop results in a non-zero
> value.
> 
> Spotted by Coverity: CID 1398640
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-02-18 15:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15 16:25 [Qemu-devel] [PATCH 0/3] Coverity fixes Paul Durrant
2019-02-15 16:25 ` Paul Durrant
2019-02-15 16:25 ` [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code Paul Durrant
2019-02-15 16:25   ` Paul Durrant
2019-02-15 20:38   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-02-18 14:27     ` Anthony PERARD
2019-02-18 14:27       ` Anthony PERARD
2019-02-15 20:38   ` Philippe Mathieu-Daudé
2019-02-15 16:25 ` [PATCH 2/3] xen-block: remove redundant assignment Paul Durrant
2019-02-15 16:25 ` [Qemu-devel] " Paul Durrant
2019-02-18 14:43   ` Anthony PERARD
2019-02-18 14:43     ` Anthony PERARD
2019-02-15 16:25 ` [Qemu-devel] [PATCH 3/3] xen-block: report error condition from vbd_name_to_disk() Paul Durrant
2019-02-15 16:25   ` Paul Durrant
2019-02-18 15:43   ` [Qemu-devel] " Anthony PERARD
2019-02-18 15:43   ` Anthony PERARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.