s390x/event-facility: fix error propagation
PATCH 1/1 s390x/event-facility: fix error propagation
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.
--- hw/s390x/event-facility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/event-facility.c +1 -1
@@ -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 ; }
Signature · 1 line
2.21.1
Quoted 20 lines · Cornelia Huck
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 <[email protected]>Fixes 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")Signed-off-by Cornelia Huck <[email protected]>--- hw/s390x/event-facility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/s390x/event-facility.c +0
-0
hw/s390x/event-facility.c static void sclp_events_bus_realize(BusState *bus, Error **errp) · line 344
Quoted 8 lines
hw/s390x/event-facility.c +1
-1@@ -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 ; }
Signature · 3 lines
Thanks, David / dhildenb
Quoted 10 lines · Cornelia Huck
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 <[email protected]>Fixes 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")Signed-off-by Cornelia Huck <[email protected]>
Quoted 18 lines
--- hw/s390x/event-facility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/s390x/event-facility.c +1
-1@@ -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 ; }
Quoted 20 lines · Cornelia Huck
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 <[email protected]>Fixes 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")Signed-off-by Cornelia Huck <[email protected]>--- hw/s390x/event-facility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/s390x/event-facility.c +0
-0
hw/s390x/event-facility.c static void sclp_events_bus_realize(BusState *bus, Error **errp) · line 344
Quoted 8 lines
hw/s390x/event-facility.c +1
-1@@ -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 ; }
Quoted 19 lines · Cornelia Huck
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 <[email protected]>Fixes 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")Signed-off-by Cornelia Huck <[email protected]>--- hw/s390x/event-facility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/s390x/event-facility.c +0
-0
hw/s390x/event-facility.c static void sclp_events_bus_realize(BusState *bus, Error **errp) · line 344
Quoted 8 lines
hw/s390x/event-facility.c +1
-1@@ -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!
Cornelia Huck
AppliedQuoted 19 lines · On Tue, 21 Jan 2020 10:55:06 +0100 Cornelia Huck <[email protected]> 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 <[email protected]>Fixes 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")Signed-off-by Cornelia Huck <[email protected]>--- hw/s390x/event-facility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/s390x/event-facility.c +0
-0
hw/s390x/event-facility.c static void sclp_events_bus_realize(BusState *bus, Error **errp) · line 344
Quoted 8 lines
hw/s390x/event-facility.c +1
-1@@ -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.