mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
KVM: s390: Fix potential tiny kernel stack leak
In some circumstances, one bit of kernel stack could have been leaked
from dat_cond_set_storage_key().
Fix by clearing prev before use.
Fixes: 8e03e8316e ("KVM: s390: KVM page table management functions: storage keys")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260812104436.109741-9-imbrenda@linux.ibm.com>
This commit is contained in:
parent
6b1130e1b4
commit
30300ec278
|
|
@ -737,6 +737,7 @@ int dat_cond_set_storage_key(struct kvm_s390_mmu_cache *mmc, union asce asce, gf
|
|||
pgste.fp = skey.fp;
|
||||
pgste.gc = skey.c;
|
||||
pgste.gr = skey.r;
|
||||
prev.skey = 0;
|
||||
|
||||
if (!ptep->h.i) {
|
||||
rc = page_cond_set_storage_key(pte_origin(*ptep), skey, &prev, nq, mr, mc);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user