summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorClaudio Imbrenda <imbrenda@linux.ibm.com>2024-10-30 17:19:06 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-10-31 10:50:07 +0100
commit64844729a608d308089510fc3bb23abf602f4e47 (patch)
treefb970c1b61c62cd27e20bff39e2fbb8273089e55 /arch/s390
parentf55bd479d8663a4a4e403b3d308d3d1aa33d92df (diff)
downloadlinux-stable-64844729a608d308089510fc3bb23abf602f4e47.tar.gz
linux-stable-64844729a608d308089510fc3bb23abf602f4e47.tar.bz2
linux-stable-64844729a608d308089510fc3bb23abf602f4e47.zip
s390/kvm: Initialize uninitialized flags variable
The flags variable was being used uninitialized. Initialize it to 0 as expected. For some reason neither gcc nor clang reported a warning. Fixes: 05066cafa925 ("s390/mm/fault: Handle guest-related program interrupts in KVM") Reported-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20241030161906.85476-1-imbrenda@linux.ibm.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kvm/kvm-s390.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 10947d076603..5d113428b4cc 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -4729,8 +4729,8 @@ static int vcpu_post_run_addressing_exception(struct kvm_vcpu *vcpu)
static int vcpu_post_run_handle_fault(struct kvm_vcpu *vcpu)
{
+ unsigned int flags = 0;
unsigned long gaddr;
- unsigned int flags;
int rc = 0;
gaddr = current->thread.gmap_teid.addr * PAGE_SIZE;