From: Nikita Ostrenkov <n.ostrenkov@gmail.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Nikita Ostrenkov <n.ostrenkov@gmail.com>
Subject: [PATCH] system: fix assertion when cannot get/set rlimit
Date: Wed, 12 Mar 2025 16:16:03 +0000 [thread overview]
Message-ID: <20250312161603.24820-1-n.ostrenkov@gmail.com> (raw)
If cannot get/set rlinit warn_print called, which uses monitor_lock mutex. monitor_lock mutex initialized in monitor_init_globals, then monitor_init_globals should be called before os_setup_limits.
Signed-off-by: Nikita Ostrenkov <n.ostrenkov@gmail.com>
---
system/runstate.c | 1 -
system/vl.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/system/runstate.c b/system/runstate.c
index 272801d307..de01cb9833 100644
--- a/system/runstate.c
+++ b/system/runstate.c
@@ -874,7 +874,6 @@ void qemu_init_subsystems(void)
runstate_init();
precopy_infrastructure_init();
postcopy_infrastructure_init();
- monitor_init_globals();
if (qcrypto_init(&err) < 0) {
error_reportf_err(err, "cannot initialize crypto: ");
diff --git a/system/vl.c b/system/vl.c
index 04f78466c4..0742a3b407 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -2885,6 +2885,8 @@ void qemu_init(int argc, char **argv)
error_init(argv[0]);
qemu_init_exec_dir(argv[0]);
+ monitor_init_globals();
+
os_setup_limits();
#ifdef CONFIG_MODULES
--
2.34.1
reply other threads:[~2025-03-12 16:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250312161603.24820-1-n.ostrenkov@gmail.com \
--to=n.ostrenkov@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).