Message ID | 20250314143500.2449658-3-armbru@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | xen: An error handling fix | expand |
On Fri, 14 Mar 2025, Markus Armbruster wrote: > xen_bus_realize() reports a failure to set up a watch as error, but it > doesn't treat it as one: it simply continues. Report a warning > instead. > > Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> > --- > hw/xen/xen-bus.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c > index 2aacc1436f..f808a01813 100644 > --- a/hw/xen/xen-bus.c > +++ b/hw/xen/xen-bus.c > @@ -353,10 +353,9 @@ static void xen_bus_realize(BusState *bus, Error **errp) > xs_node_watch(xenbus->xsh, node, key, xen_bus_backend_changed, > xenbus, &local_err); > if (local_err) { > - /* This need not be treated as a hard error so don't propagate */ > - error_reportf_err(local_err, > - "failed to set up '%s' enumeration watch: ", > - type[i]); > + warn_reportf_err(local_err, > + "failed to set up '%s' enumeration watch: ", > + type[i]); > local_err = NULL; > } > > -- > 2.48.1 >
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c index 2aacc1436f..f808a01813 100644 --- a/hw/xen/xen-bus.c +++ b/hw/xen/xen-bus.c @@ -353,10 +353,9 @@ static void xen_bus_realize(BusState *bus, Error **errp) xs_node_watch(xenbus->xsh, node, key, xen_bus_backend_changed, xenbus, &local_err); if (local_err) { - /* This need not be treated as a hard error so don't propagate */ - error_reportf_err(local_err, - "failed to set up '%s' enumeration watch: ", - type[i]); + warn_reportf_err(local_err, + "failed to set up '%s' enumeration watch: ", + type[i]); local_err = NULL; }
xen_bus_realize() reports a failure to set up a watch as error, but it doesn't treat it as one: it simply continues. Report a warning instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- hw/xen/xen-bus.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)