[Qemu-devel] [PATCH] nfs: Fix error path in nfs_options_qdict_to_qapi()

Kevin Wolf posted 1 patch 5 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180516161034.27440-1-kwolf@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
block/nfs.c | 1 +
1 file changed, 1 insertion(+)
[Qemu-devel] [PATCH] nfs: Fix error path in nfs_options_qdict_to_qapi()
Posted by Kevin Wolf 5 years, 11 months ago
Don't throw away local_err, but propagate it to errp.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/nfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/nfs.c b/block/nfs.c
index d6364d28bb..3349b67a76 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -571,6 +571,7 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
     qobject_unref(crumpled);
 
     if (local_err) {
+        error_propagate(errp, local_err);
         return NULL;
     }
 
-- 
2.13.6


Re: [Qemu-devel] [PATCH] nfs: Fix error path in nfs_options_qdict_to_qapi()
Posted by Eric Blake 5 years, 11 months ago
On 05/16/2018 11:10 AM, Kevin Wolf wrote:
> Don't throw away local_err, but propagate it to errp.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>   block/nfs.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block/nfs.c b/block/nfs.c
> index d6364d28bb..3349b67a76 100644
> --- a/block/nfs.c
> +++ b/block/nfs.c
> @@ -571,6 +571,7 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
>       qobject_unref(crumpled);
>   
>       if (local_err) {
> +        error_propagate(errp, local_err);
>           return NULL;
>       }
>   
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] nfs: Fix error path in nfs_options_qdict_to_qapi()
Posted by Jeff Cody 5 years, 11 months ago
On Wed, May 16, 2018 at 06:10:34PM +0200, Kevin Wolf wrote:
> Don't throw away local_err, but propagate it to errp.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/nfs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/block/nfs.c b/block/nfs.c
> index d6364d28bb..3349b67a76 100644
> --- a/block/nfs.c
> +++ b/block/nfs.c
> @@ -571,6 +571,7 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
>      qobject_unref(crumpled);
>  
>      if (local_err) {
> +        error_propagate(errp, local_err);
>          return NULL;
>      }
>  
> -- 
> 2.13.6
> 

Thanks,

Applied to my block branch:

git://github.com/codyprime/qemu-kvm-jtc block

-Jeff