linux-stable/drivers/hv
Dexuan Cui a912e16fae Drivers: hv: vmbus: Check for ring when getting debug info
commit ba50bf1ce9 upstream.

fc96df16a1 is good and can already fix the "return stack garbage" issue,
but let's also improve hv_ringbuffer_get_debuginfo(), which would silently
return stack garbage, if people forget to check channel->state or
ring_info->ring_buffer, when using the function in the future.

Having an error check in the function would eliminate the potential risk.

Add a Fixes tag to indicate the patch depdendency.

Fixes: fc96df16a1 ("Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels")
Cc: stable@vger.kernel.org
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-31 08:14:36 +01:00
..
channel.c Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl() 2018-12-05 19:32:14 +01: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: Cleanup synic memory free path 2018-08-02 10:20:59 +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: 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_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