From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: stephen.s.brennan@oracle.com, marcandre.lureau@redhat.com,
berrange@redhat.com
Subject: [PATCH 1/2] dump: Plug file descriptor leak on non-seekable file
Date: Wed, 8 Nov 2023 06:37:30 +0100 [thread overview]
Message-ID: <20231108053731.112043-2-armbru@redhat.com> (raw)
In-Reply-To: <20231108053731.112043-1-armbru@redhat.com>
Fixes: e6549197f7ed (dump: Add command interface for kdump-raw formats)
Fixes: CID 1523842
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
dump/dump.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dump/dump.c b/dump/dump.c
index 1c304cadfd..ad5294e853 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -2160,6 +2160,7 @@ void qmp_dump_guest_memory(bool paging, const char *protocol,
return;
}
if (kdump_raw && lseek(fd, 0, SEEK_CUR) == (off_t) -1) {
+ close(fd);
error_setg(errp, "kdump-raw formats require a seekable file");
return;
}
--
2.41.0
next prev parent reply other threads:[~2023-11-08 5:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 5:37 [PATCH 0/2] dump: Fix issues flagged by Coverity Markus Armbruster
2023-11-08 5:37 ` Markus Armbruster [this message]
2023-11-08 7:05 ` [PATCH 1/2] dump: Plug file descriptor leak on non-seekable file Marc-André Lureau
2023-11-08 5:37 ` [PATCH 2/2] dump: Fix HMP dump-guest-memory -z without -R Markus Armbruster
2023-11-08 8:07 ` Marc-André Lureau
2023-11-08 7:36 ` [PATCH 0/2] dump: Fix issues flagged by Coverity Stephen Brennan
2023-11-08 10:31 ` Markus Armbruster
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=20231108053731.112043-2-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stephen.s.brennan@oracle.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;
as well as URLs for NNTP newsgroup(s).