linux/drivers/hv
Dexuan Cui c8d92394ed 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: 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>
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-05-02 21:41:16 +01:00
..
channel.c Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl() 2019-02-11 17:54:13 +00:00
channel_mgmt.c Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg() 2017-06-05 21:16:49 +01:00
connection.c Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect() 2018-12-16 22:09:31 +00:00
hv.c x86/retpoline/hyperv: Convert assembler indirect jumps 2018-03-19 18:59:07 +00:00
hv_balloon.c Drivers: hv: balloon: Ensure pressure reports are posted regularly 2014-05-03 19:25:17 -04:00
hv_fcopy.c Drivers: hv: hv_fcopy: fix a race condition for SMP guest 2014-07-17 18:43:10 -07:00
hv_kvp.c Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up 2019-02-11 17:53:59 +00:00
hv_snapshot.c connector: add portid to unicast in addition to broadcasting 2014-02-07 15:40:17 -08:00
hv_util.c hv: do not lose pending heartbeat vmbus packets 2017-02-23 03:54:20 +00:00
hyperv_vmbus.h Drivers: hv: vmbus: Check for ring when getting debug info 2019-05-02 21:41:16 +01:00
Kconfig x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
Makefile Drivers: hv: Implement the file copy service 2014-02-18 10:53:48 -08:00
ring_buffer.c Drivers: hv: vmbus: Check for ring when getting debug info 2019-05-02 21:41:16 +01:00
vmbus_drv.c Drivers: hv: vmbus: Check for ring when getting debug info 2019-05-02 21:41:16 +01:00