diff options
author | 2020-05-11 09:42:31 +0200 | |
---|---|---|
committer | 2020-05-21 12:59:15 -0500 | |
commit | c8d70a29d6bbc956013f3401f92a4431a9385a3c (patch) | |
tree | 32baf767179e14f69bc8447744d190452f95c5cc /drivers/xen | |
parent | Linux 5.7-rc6 (diff) | |
download | wireguard-linux-c8d70a29d6bbc956013f3401f92a4431a9385a3c.tar.xz wireguard-linux-c8d70a29d6bbc956013f3401f92a4431a9385a3c.zip |
xen/pvcalls-back: test for errors when calling backend_connect()
backend_connect() can fail, so switch the device to connected only if
no error occurred.
Fixes: 0a9c75c2c7258f2 ("xen/pvcalls: xenbus state handling")
Cc: [email protected]
Signed-off-by: Juergen Gross <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: Boris Ostrovsky <[email protected]>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/pvcalls-back.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c index cf4ce3e9358d..41a18ece029a 100644 --- a/drivers/xen/pvcalls-back.c +++ b/drivers/xen/pvcalls-back.c @@ -1088,7 +1088,8 @@ static void set_backend_state(struct xenbus_device *dev, case XenbusStateInitialised: switch (state) { case XenbusStateConnected: - backend_connect(dev); + if (backend_connect(dev)) + return; xenbus_switch_state(dev, XenbusStateConnected); break; case XenbusStateClosing: |