aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-06-22 12:54:35 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2022-06-24 17:26:49 +0200
commit729697f3cadfa83631bfdcda567ae6fbbcd9d44b (patch)
treeb49d17b133f59ea5d52a0ee78f360aeb5f58a9eb /fs/btrfs
parentpowerpc/powernv: rename remaining rng powernv_ functions to pnv_ (diff)
downloadlinux-dev-729697f3cadfa83631bfdcda567ae6fbbcd9d44b.tar.xz
linux-dev-729697f3cadfa83631bfdcda567ae6fbbcd9d44b.zip
powerpc/kvm: don't crash on missing rng, and use darn
On POWER8 systems that don't have ibm,power-rng available, a guest that ignores the KVM_CAP_PPC_HWRNG flag and calls H_RANDOM anyway will dereference a NULL pointer. And on machines with darn instead of ibm,power-rng, H_RANDOM won't work at all. This patch kills two birds with one stone, by routing H_RANDOM calls to ppc_md.get_random_seed, and doing the real mode check inside of it. Cc: stable@vger.kernel.org # v4.1+ Cc: Michael Ellerman <mpe@ellerman.id.au> Fixes: e928e9cb3601 ("KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'fs/btrfs')
0 files changed, 0 insertions, 0 deletions