From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: borntraeger@de.ibm.com, nsg@linux.ibm.com, nrb@linux.ibm.com,
frankja@linux.ibm.com, seiden@linux.ibm.com, hca@linux.ibm.com,
agordeev@linux.ibm.com, gor@linux.ibm.com,
gerald.schaefer@linux.ibm.com, kvm@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: [PATCH v1 1/1] s390/kvm: initialize uninitialized flags variable
Date: Wed, 30 Oct 2024 17:19:06 +0100 [thread overview]
Message-ID: <20241030161906.85476-1-imbrenda@linux.ibm.com> (raw)
The flags variable was being used uninitialized.
Initialize it to 0 as expected.
For some reason neither gcc nor clang reported a warning.
Fixes: ce2b276ebe51 ("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>
---
arch/s390/kvm/kvm-s390.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index a5750c14bb4d..8b3afda99397 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;
--
2.47.0
next reply other threads:[~2024-10-30 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 16:19 Claudio Imbrenda [this message]
2024-10-30 17:04 ` [PATCH v1 1/1] s390/kvm: initialize uninitialized flags variable Heiko Carstens
2024-11-04 9:43 ` Janosch Frank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241030161906.85476-1-imbrenda@linux.ibm.com \
--to=imbrenda@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=nsg@linux.ibm.com \
--cc=seiden@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox