diff options
| author | Paul Mackerras <[email protected]> | 2018-02-07 08:49:54 +0000 |
|---|---|---|
| committer | Paul Mackerras <[email protected]> | 2018-02-09 04:35:24 +0000 |
| commit | 05f2bb0313a2855e491dadfc8319b7da261d7074 (patch) | |
| tree | 5e75fbfcc885ae5235eaaef4ef2ef310160ab56d /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
| parent | KVM: PPC: Book3S PR: Fix broken select due to misspelling (diff) | |
| download | kernel-05f2bb0313a2855e491dadfc8319b7da261d7074.tar.gz kernel-05f2bb0313a2855e491dadfc8319b7da261d7074.zip | |
KVM: PPC: Book3S HV: Fix handling of secondary HPTEG in HPT resizing code
This fixes the computation of the HPTE index to use when the HPT
resizing code encounters a bolted HPTE which is stored in its
secondary HPTE group. The code inverts the HPTE group number, which
is correct, but doesn't then mask it with new_hash_mask. As a result,
new_pteg will be effectively negative, resulting in new_hptep
pointing before the new HPT, which will corrupt memory.
In addition, this removes two BUG_ON statements. The condition that
the BUG_ONs were testing -- that we have computed the hash value
incorrectly -- has never been observed in testing, and if it did
occur, would only affect the guest, not the host. Given that
BUG_ON should only be used in conditions where the kernel (i.e.
the host kernel, in this case) can't possibly continue execution,
it is not appropriate here.
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions
