projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1e5b3f
)
xenbus: check return value of xenbus_scanf()
author
Jan Beulich
<JBeulich@suse.com>
Mon, 24 Oct 2016 15:05:18 +0000
(09:05 -0600)
committer
David Vrabel
<david.vrabel@citrix.com>
Mon, 24 Oct 2016 15:08:21 +0000
(16:08 +0100)
Don't ignore errors here: Set backend state to unknown when
unsuccessful.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/xen/xenbus/xenbus_probe_frontend.c
patch
|
blob
|
history
diff --git
a/drivers/xen/xenbus/xenbus_probe_frontend.c
b/drivers/xen/xenbus/xenbus_probe_frontend.c
index
611a231
..
6d40a97
100644
(file)
--- a/
drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/
drivers/xen/xenbus/xenbus_probe_frontend.c
@@
-335,7
+335,9
@@
static int backend_state;
static void xenbus_reset_backend_state_changed(struct xenbus_watch *w,
const char **v, unsigned int l)
{
- xenbus_scanf(XBT_NIL, v[XS_WATCH_PATH], "", "%i", &backend_state);
+ if (xenbus_scanf(XBT_NIL, v[XS_WATCH_PATH], "", "%i",
+ &backend_state) != 1)
+ backend_state = XenbusStateUnknown;
printk(KERN_DEBUG "XENBUS: backend %s %s\n",
v[XS_WATCH_PATH], xenbus_strstate(backend_state));
wake_up(&backend_state_wq);