]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
authorDexuan Cui <decui@microsoft.com>
Thu, 13 Dec 2018 16:35:43 +0000 (16:35 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit582bcbd2f0283a783f2efd1b32fe751b2e5dc70d
treef819ccd362b66f92275142228af2e4a1dfa57b4e
parent62c8b845664c7b1657923a32c97ca28416a507f5
Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

BugLink: https://bugs.launchpad.net/bugs/1837257
commit fc96df16a1ce80cbb3c316ab7d4dc8cd5c2852ce upstream.

Before 98f4c651762c, we returned zeros for unopened channels.
With 98f4c651762c, we started to return random on-stack values.

We'd better return -EINVAL instead.

Fixes: 98f4c651762c ("hv: move ringbuffer bus attributes to dev_groups")
Cc: stable@vger.kernel.org
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: 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>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hv/vmbus_drv.c