Drivers: hv: vmbus: Fix rescind handling issues
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 11 Aug 2017 17:03:59 +0000 (10:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 16:16:29 +0000 (09:16 -0700)
commit6f3d791f300618caf82a2be0c27456edd76d5164
treeb92051bd127b0e5a0482f7eabe9d97e1986c9c00
parent3f2baa8a7d2efaa836f1dc4b8ee8c3ca4ba9e101
Drivers: hv: vmbus: Fix rescind handling issues

This patch handles the following issues that were observed when we are
handling racing channel offer message and rescind message for the same
offer:

1. Since the host does not respond to messages on a rescinded channel,
in the current code, we could be indefinitely blocked on the vmbus_open() call.

2. When a rescinded channel is being closed, if there is a pending interrupt on the
channel, we could end up freeing the channel that the interrupt handler would run on.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Tested-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel.c
drivers/hv/channel_mgmt.c
drivers/hv/vmbus_drv.c
include/linux/hyperv.h