dump: Fix issues flagged by Coverity
v2 cover dump: Fix issues flagged by Coverity
v2:
* PATCH 1 superseded by commit 95a40c44501 (dump: Add close fd on error return to avoid resource leak)
* PATCH 2 fell through the cracks; reposting unchanged
Markus Armbruster (1):
dump: Fix HMP dump-guest-memory -z without -R
dump/dump-hmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH v2 1/1 dump: Fix HMP dump-guest-memory -z without -R
-z without -R has no effect: the dump format remains @elf. Fix the logic error so it becomes @kdump-zlib.
--- dump/dump-hmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dump/dump-hmp-cmds.c +1 -1
@@ -41,7 +41,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict) dump_format =DUMP_GUEST_MEMORY_FORMAT_WIN_DMP ; } -if (zlib && raw) { +if (zlib) {if (raw) { dump_format =DUMP_GUEST_MEMORY_FORMAT_KDUMP_RAW_ZLIB ; }else {
Signature · 1 line
2.43.0
Re: [PATCH v2 1/1] dump: Fix HMP dump-guest-memory -z without -R
Any takers?
Quoted 25 lines · Markus Armbruster
-z without -R has no effect: the dump format remains @elf. Fix the logic error so it becomes @kdump-zlib.
Fixes e6549197f7ed (dump: Add command interface for kdump-raw formats)Fixes CID 1523841Signed-off-by Markus Armbruster <[email protected]>Reviewed-by Stephen Brennan <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>--- dump/dump-hmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)dump/dump-hmp-cmds.c +1
-1@@ -41,7 +41,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict) dump_format =DUMP_GUEST_MEMORY_FORMAT_WIN_DMP ; } -if (zlib && raw) { +if (zlib) {if (raw) { dump_format =DUMP_GUEST_MEMORY_FORMAT_KDUMP_RAW_ZLIB ; }else {
Re: [PATCH v2 1/1] dump: Fix HMP dump-guest-memory -z without -R
Hi Markus
Quoted 3 lines · Markus Armbruster
Any takers?
I have it in my "dump" queue, but it's the only patch I got so far (I could have missed others).
If it can go through my other means, that's fine with me
Quoted 29 lines
Quoted 25 lines · Markus Armbruster
-z without -R has no effect: the dump format remains @elf. Fix the logic error so it becomes @kdump-zlib.
Fixes e6549197f7ed (dump: Add command interface for kdump-raw formats)Fixes CID 1523841Signed-off-by Markus Armbruster <[email protected]>Reviewed-by Stephen Brennan <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>--- dump/dump-hmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)dump/dump-hmp-cmds.c +1
-1@@ -41,7 +41,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict) dump_format =DUMP_GUEST_MEMORY_FORMAT_WIN_DMP ; } -if (zlib && raw) { +if (zlib) {if (raw) { dump_format =DUMP_GUEST_MEMORY_FORMAT_KDUMP_RAW_ZLIB ; }else {
Signature · 1 line
Marc-André Lureau
Re: [PATCH v2 1/1] dump: Fix HMP dump-guest-memory -z without -R
Quoted 11 lines · Marc-André Lureau
Hi Markus
Quoted 3 lines · Markus Armbruster
Any takers?
I have it in my "dump" queue, but it's the only patch I got so far (I could have missed others).
If it can go through my other means, that's fine with me
Let's try qemu-trivial (cc'ed). Thanks!
Quoted 1 line
Quoted 1 line
Markus Armbruster <[email protected]> writes:
Michael Tokarev
AppliedRe: [PATCH v2 1/1] dump: Fix HMP dump-guest-memory -z without -R
In reply to Markus Armbruster22.12.2023 12:38, Markus Armbruster :
Quoted 8 lines
-z without -R has no effect: the dump format remains @elf. Fix the logic error so it becomes @kdump-zlib.
Fixes e6549197f7ed (dump: Add command interface for kdump-raw formats)Fixes CID 1523841Signed-off-by Markus Armbruster <[email protected]>Reviewed-by Stephen Brennan <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>
Applied to trivial-patches tree, thanks!
/mjt