Drivers: hv: vmbus: Fix a rescind handling bug
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 23 Dec 2016 00:54:00 +0000 (16:54 -0800)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:48:47 +0000 (15:48 +0100)
commit ccb61f8a99e6c29df4fb96a65dad4fad740d5be9 upstream.

The host can rescind a channel that has been offered to the
guest and once the channel is rescinded, the host does not
respond to any requests on that channel. Deal with the case where
the guest may be blocked waiting for a response from the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel.c

index 1606e7f08f4b36750be747feb5d0e9f36b3e6dd0..9aff4f6f5423a3b03fa834d4f69d4bb5cbc07a07 100644 (file)
@@ -506,6 +506,11 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
 
        wait_for_completion(&info->waitevent);
 
+       if (channel->rescind) {
+               ret = -ENODEV;
+               goto post_msg_err;
+       }
+
 post_msg_err:
        /*
         * If the channel has been rescinded;