powerpc/mm/hash: Check for non-kernel address in get_kernel_vsid()
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Mar 2017 12:10:34 +0000 (23:10 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 31 Mar 2017 12:09:59 +0000 (23:09 +1100)
commit85beb1c486df76a7a851a0e063785282c2608f37
treeda13f327c397a15d75ec0790bc143d9c790b4f23
parent941711a3a049abc012be0eb8856ff6eec40a4570
powerpc/mm/hash: Check for non-kernel address in get_kernel_vsid()

get_kernel_vsid() has a very stern comment saying that it's only valid
for kernel addresses, but there's nothing in the code to enforce that.

Rather than hoping our callers are well behaved, add a check and return
a VSID of 0 (invalid).

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/mmu-hash.h