1
0
Fork 0
remarkable-linux/drivers/hv
Dexuan Cui 91b48a9ced Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
commit d3b26dd7cb upstream.

Before setting channel->rescind in vmbus_rescind_cleanup(), we should make
sure the channel callback won't run any more, otherwise a high-level
driver like pci_hyperv, which may be infinitely waiting for the host VSP's
response and notices the channel has been rescinded, can't safely give
up: e.g., in hv_pci_protocol_negotiation() -> wait_for_response(), it's
unsafe to exit from wait_for_response() and proceed with the on-stack
variable "comp_pkt" popped. The issue was originally spotted by
Michael Kelley <mikelley@microsoft.com>.

In vmbus_close_internal(), the patch also minimizes the range protected by
disabling/enabling channel->callback_event: we don't really need that for
the whole function.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Cc: stable@vger.kernel.org
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-09 19:55:56 +02:00
..
Kconfig x86/hyper-v: Use hypercall for remote TLB flush 2017-08-10 20:16:44 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
channel.c Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind() 2018-09-09 19:55:56 +02:00
channel_mgmt.c Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind() 2018-09-09 19:55:56 +02:00
connection.c hyper-v: Globalize vp_index 2017-08-10 16:50:23 +02:00
hv.c hyper-v: Globalize vp_index 2017-08-10 16:50:23 +02:00
hv_balloon.c Drivers: hv: balloon: Initialize last_post_time on startup 2017-08-16 09:14:43 -07:00
hv_fcopy.c Drivers: hv: fcopy: restore correct transfer length 2017-09-22 10:29:54 +02:00
hv_kvp.c Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id 2017-08-16 09:14:43 -07:00
hv_snapshot.c Merge 4.11-rc4 into char-misc-next 2017-03-27 09:13:04 +02:00
hv_util.c hv_utils: fix TimeSync work on pre-TimeSync-v4 hosts 2017-05-25 15:42:42 +02:00
hv_utils_transport.c Drivers: hv: util: move waiting for release to hv_utils_transport itself 2017-03-16 16:42:00 +09:00
hv_utils_transport.h Drivers: hv: util: move waiting for release to hv_utils_transport itself 2017-03-16 16:42:00 +09:00
hyperv_vmbus.h hyper-v: Globalize vp_index 2017-08-10 16:50:23 +02:00
ring_buffer.c Drivers: hv: vmbus: Fix ring buffer signaling 2018-03-28 18:24:34 +02:00
vmbus_drv.c x86/virt: Add enum for hypervisors to replace x86_hyper 2017-12-25 14:26:20 +01:00