qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390x/event-facility: fix error propagation
@ 2020-01-21  9:55 Cornelia Huck
  2020-01-21  9:57 ` David Hildenbrand
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Cornelia Huck @ 2020-01-21  9:55 UTC (permalink / raw)
  To: qemu-s390x
  Cc: Christian Borntraeger, Cornelia Huck, qemu-devel,
	Markus Armbruster, David Hildenbrand

We currently check (by error) if the passed-in Error pointer errp
is non-null and return after realizing the first child of the
event facility in that case. Symptom is that 'virsh shutdown'
does not work, as the sclpquiesce device is not realized.

Fix this by (correctly) checking the local Error err.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 hw/s390x/event-facility.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index 8a93b8a1da97..9d6972afa8b3 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -338,7 +338,7 @@ static void sclp_events_bus_realize(BusState *bus, Error **errp)
         DeviceState *dev = kid->child;
 
         object_property_set_bool(OBJECT(dev), true, "realized", &err);
-        if (errp) {
+        if (err) {
             error_propagate(errp, err);
             return;
         }
-- 
2.21.1



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

* Re: [PATCH] s390x/event-facility: fix error propagation
  2020-01-21  9:55 [PATCH] s390x/event-facility: fix error propagation Cornelia Huck
@ 2020-01-21  9:57 ` David Hildenbrand
  2020-01-21  9:57 ` Christian Borntraeger
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Hildenbrand @ 2020-01-21  9:57 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x
  Cc: Christian Borntraeger, qemu-devel, Markus Armbruster

On 21.01.20 10:55, Cornelia Huck wrote:
> We currently check (by error) if the passed-in Error pointer errp
> is non-null and return after realizing the first child of the
> event facility in that case. Symptom is that 'virsh shutdown'
> does not work, as the sclpquiesce device is not realized.
> 
> Fix this by (correctly) checking the local Error err.
> 
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  hw/s390x/event-facility.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
> index 8a93b8a1da97..9d6972afa8b3 100644
> --- a/hw/s390x/event-facility.c
> +++ b/hw/s390x/event-facility.c
> @@ -338,7 +338,7 @@ static void sclp_events_bus_realize(BusState *bus, Error **errp)
>          DeviceState *dev = kid->child;
>  
>          object_property_set_bool(OBJECT(dev), true, "realized", &err);
> -        if (errp) {
> +        if (err) {
>              error_propagate(errp, err);
>              return;
>          }
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



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

* Re: [PATCH] s390x/event-facility: fix error propagation
  2020-01-21  9:55 [PATCH] s390x/event-facility: fix error propagation Cornelia Huck
  2020-01-21  9:57 ` David Hildenbrand
@ 2020-01-21  9:57 ` Christian Borntraeger
  2020-01-21 10:06 ` Thomas Huth
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Christian Borntraeger @ 2020-01-21  9:57 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x
  Cc: Markus Armbruster, qemu-devel, David Hildenbrand



On 21.01.20 10:55, Cornelia Huck wrote:
> We currently check (by error) if the passed-in Error pointer errp
> is non-null and return after realizing the first child of the
> event facility in that case. Symptom is that 'virsh shutdown'
> does not work, as the sclpquiesce device is not realized.
> 
> Fix this by (correctly) checking the local Error err.
> 
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>

Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>

> ---
>  hw/s390x/event-facility.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
> index 8a93b8a1da97..9d6972afa8b3 100644
> --- a/hw/s390x/event-facility.c
> +++ b/hw/s390x/event-facility.c
> @@ -338,7 +338,7 @@ static void sclp_events_bus_realize(BusState *bus, Error **errp)
>          DeviceState *dev = kid->child;
>  
>          object_property_set_bool(OBJECT(dev), true, "realized", &err);
> -        if (errp) {
> +        if (err) {
>              error_propagate(errp, err);
>              return;
>          }
> 



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

* Re: [PATCH] s390x/event-facility: fix error propagation
  2020-01-21  9:55 [PATCH] s390x/event-facility: fix error propagation Cornelia Huck
  2020-01-21  9:57 ` David Hildenbrand
  2020-01-21  9:57 ` Christian Borntraeger
@ 2020-01-21 10:06 ` Thomas Huth
  2020-01-21 12:37 ` Markus Armbruster
  2020-01-21 12:55 ` Cornelia Huck
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2020-01-21 10:06 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x
  Cc: Christian Borntraeger, David Hildenbrand, qemu-devel,
	Markus Armbruster

On 21/01/2020 10.55, Cornelia Huck wrote:
> We currently check (by error) if the passed-in Error pointer errp
> is non-null and return after realizing the first child of the
> event facility in that case. Symptom is that 'virsh shutdown'
> does not work, as the sclpquiesce device is not realized.
> 
> Fix this by (correctly) checking the local Error err.
> 
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  hw/s390x/event-facility.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
> index 8a93b8a1da97..9d6972afa8b3 100644
> --- a/hw/s390x/event-facility.c
> +++ b/hw/s390x/event-facility.c
> @@ -338,7 +338,7 @@ static void sclp_events_bus_realize(BusState *bus, Error **errp)
>          DeviceState *dev = kid->child;
>  
>          object_property_set_bool(OBJECT(dev), true, "realized", &err);
> -        if (errp) {
> +        if (err) {
>              error_propagate(errp, err);
>              return;
>          }
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH] s390x/event-facility: fix error propagation
  2020-01-21  9:55 [PATCH] s390x/event-facility: fix error propagation Cornelia Huck
                   ` (2 preceding siblings ...)
  2020-01-21 10:06 ` Thomas Huth
@ 2020-01-21 12:37 ` Markus Armbruster
  2020-01-21 12:55 ` Cornelia Huck
  4 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2020-01-21 12:37 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Christian Borntraeger, qemu-s390x, qemu-devel, David Hildenbrand

Cornelia Huck <cohuck@redhat.com> writes:

> We currently check (by error) if the passed-in Error pointer errp
> is non-null and return after realizing the first child of the
> event facility in that case. Symptom is that 'virsh shutdown'
> does not work, as the sclpquiesce device is not realized.
>
> Fix this by (correctly) checking the local Error err.
>
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  hw/s390x/event-facility.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
> index 8a93b8a1da97..9d6972afa8b3 100644
> --- a/hw/s390x/event-facility.c
> +++ b/hw/s390x/event-facility.c
> @@ -338,7 +338,7 @@ static void sclp_events_bus_realize(BusState *bus, Error **errp)
>          DeviceState *dev = kid->child;
>  
>          object_property_set_bool(OBJECT(dev), true, "realized", &err);
> -        if (errp) {
> +        if (err) {
>              error_propagate(errp, err);
>              return;
>          }

Thanks for cleaning the mess I made!

Reviewed-by: Markus Armbruster <armbru@redhat.com>



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

* Re: [PATCH] s390x/event-facility: fix error propagation
  2020-01-21  9:55 [PATCH] s390x/event-facility: fix error propagation Cornelia Huck
                   ` (3 preceding siblings ...)
  2020-01-21 12:37 ` Markus Armbruster
@ 2020-01-21 12:55 ` Cornelia Huck
  4 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2020-01-21 12:55 UTC (permalink / raw)
  To: qemu-s390x
  Cc: Christian Borntraeger, qemu-devel, Markus Armbruster,
	David Hildenbrand

On Tue, 21 Jan 2020 10:55:06 +0100
Cornelia Huck <cohuck@redhat.com> wrote:

> We currently check (by error) if the passed-in Error pointer errp
> is non-null and return after realizing the first child of the
> event facility in that case. Symptom is that 'virsh shutdown'
> does not work, as the sclpquiesce device is not realized.
> 
> Fix this by (correctly) checking the local Error err.
> 
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  hw/s390x/event-facility.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
> index 8a93b8a1da97..9d6972afa8b3 100644
> --- a/hw/s390x/event-facility.c
> +++ b/hw/s390x/event-facility.c
> @@ -338,7 +338,7 @@ static void sclp_events_bus_realize(BusState *bus, Error **errp)
>          DeviceState *dev = kid->child;
>  
>          object_property_set_bool(OBJECT(dev), true, "realized", &err);
> -        if (errp) {
> +        if (err) {
>              error_propagate(errp, err);
>              return;
>          }

Queued to s390-next.



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

end of thread, other threads:[~2020-01-21 14:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-21  9:55 [PATCH] s390x/event-facility: fix error propagation Cornelia Huck
2020-01-21  9:57 ` David Hildenbrand
2020-01-21  9:57 ` Christian Borntraeger
2020-01-21 10:06 ` Thomas Huth
2020-01-21 12:37 ` Markus Armbruster
2020-01-21 12:55 ` Cornelia Huck

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