]> git.baikalelectronics.ru Git - kernel.git/commit
vmbus: don't return values for uninitalized channels
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 20 Aug 2018 21:16:40 +0000 (21:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2018 07:31:00 +0000 (09:31 +0200)
commitea67be676cd00dd9749231e9bd201e5f0ec98bab
treea611d54ecc7834995fc5f3371d8ccdb1ba652a79
parentf1e2065ee17c268e10e323412181d94db7b20aa1
vmbus: don't return values for uninitalized channels

For unsupported device types, the vmbus channel ringbuffer is never
initialized, and therefore reading the sysfs files will return garbage
or cause a kernel OOPS.

Fixes: 03d76a8b8a52 ("vmbus: add per-channel sysfs info")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org> # 4.15
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/vmbus_drv.c