linux-stable/drivers/hv
Dexuan Cui 11bedb2e77 Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up
[ Upstream commit e670de54c8 ]

In kvp_send_key(), we do need call process_ib_ipinfo() if
message->kvp_hdr.operation is KVP_OP_GET_IP_INFO, because it turns out
the userland hv_kvp_daemon needs the info of operation, adapter_id and
addr_family. With the incorrect fc62c3b197, the host can't get the
VM's IP via KVP.

And, fc62c3b197 added a "break;", but actually forgot to initialize
the key_size/value in the case of KVP_OP_SET, so the default key_size of
0 is passed to the kvp daemon, and the pool files
/var/lib/hyperv/.kvp_pool_* can't be updated.

This patch effectively rolls back the previous fc62c3b197, and
correctly fixes the "this statement may fall through" warnings.

This patch is tested on WS 2012 R2 and 2016.

Fixes: fc62c3b197 ("Drivers: hv: kvp: Fix two "this statement may fall through" warnings")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-16 08:21:54 +02:00
..
channel.c Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE 2019-08-29 08:28:51 +02:00
channel_mgmt.c Drivers: hv: vmbus: Offload the handling of channels to two workqueues 2018-12-13 09:16:22 +01:00
connection.c Drivers: hv: vmbus: Offload the handling of channels to two workqueues 2018-12-13 09:16:22 +01:00
hv.c Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup() 2019-05-10 17:54:04 +02:00
hv_balloon.c hv_balloon: avoid touching uninitialized struct page during tail onlining 2019-01-31 08:14:36 +01: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: Fix the recent regression caused by incorrect clean-up 2019-09-16 08:21:54 +02:00
hv_snapshot.c Merge 4.11-rc4 into char-misc-next 2017-03-27 09:13:04 +02:00
hv_trace.c hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_trace.h hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_trace_balloon.h hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
hv_util.c use the new async probing feature for the hyperv drivers 2018-07-03 13:02:28 +02:00
hv_utils_transport.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08: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 Drivers: hv: vmbus: Offload the handling of channels to two workqueues 2018-12-13 09:16:22 +01:00
Kconfig x86, hyperv: remove PCI dependency 2019-01-13 09:51:00 +01:00
Makefile hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
ring_buffer.c Drivers: hv: vmbus: Check for ring when getting debug info 2019-01-31 08:14:36 +01:00
vmbus_drv.c Drivers: hv: vmbus: Check for ring when getting debug info 2019-01-31 08:14:36 +01:00