diff options
author | Michael Kelley <mikelley@microsoft.com> | 2018-08-11 02:06:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-20 20:46:31 +0300 |
commit | b0d54e40f3c44f43862e3f0952b3b0bf0984e014 (patch) | |
tree | 6379dba11447e18f0208cd80e967614264d43375 /drivers/nvmem | |
parent | a1d374ea1e95aacbace98ff2b7c657b86f5bab8e (diff) | |
download | linux-b0d54e40f3c44f43862e3f0952b3b0bf0984e014.tar.xz |
Drivers: hv: vmbus: Fix synic per-cpu context initialization
[ Upstream commit f25a7ece08bdb1f2b3c4bbeae942682fc3a99dde ]
If hv_synic_alloc() errors out, the state of the per-cpu context
for some CPUs is unknown since the zero'ing is done as each
CPU is iterated over. In such case, hv_synic_cleanup() may try to
free memory based on uninitialized values. Fix this by zero'ing
the per-cpu context for all CPUs before doing any memory
allocations that might fail.
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/nvmem')
0 files changed, 0 insertions, 0 deletions