linux-brain/drivers/hv
Dexuan Cui be0cb9e226 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:13:44 +01:00
..
Kconfig x86, hyperv: remove PCI dependency 2019-01-13 10:00:59 +01: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: check the creation_status in vmbus_establish_gpadl() 2018-12-05 19:41:26 +01:00
channel_mgmt.c Drivers: hv: vmbus: Offload the handling of channels to two workqueues 2018-12-13 09:18:53 +01:00
connection.c Drivers: hv: vmbus: Offload the handling of channels to two workqueues 2018-12-13 09:18:53 +01:00
hv.c Drivers: hv: vmbus: Cleanup synic memory free path 2018-09-19 22:43:40 +02:00
hv_balloon.c hv_balloon: avoid touching uninitialized struct page during tail onlining 2019-01-31 08:13:44 +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_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 Drivers: hv: vmbus: Offload the handling of channels to two workqueues 2018-12-13 09:18:53 +01:00
ring_buffer.c Drivers: hv: vmbus: Check for ring when getting debug info 2019-01-31 08:13:44 +01:00
vmbus_drv.c Drivers: hv: vmbus: Check for ring when getting debug info 2019-01-31 08:13:44 +01:00