[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/13] pci: Reject pcie_aer_inject_error -c with symbolic error st
From: |
Markus Armbruster |
Subject: |
[PULL 13/13] pci: Reject pcie_aer_inject_error -c with symbolic error status |
Date: |
Mon, 19 Dec 2022 16:51:20 +0100 |
When argument @error_status is symbolic, flag -c is ignored. Reject
it instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221201121133.3813857-14-armbru@redhat.com>
---
hw/pci/pci-hmp-cmds.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-cmds.c
index a292d06ea0..fb7591d6ab 100644
--- a/hw/pci/pci-hmp-cmds.c
+++ b/hw/pci/pci-hmp-cmds.c
@@ -189,6 +189,11 @@ void hmp_pcie_aer_inject_error(Monitor *mon, const QDict
*qdict)
}
error_status = num;
correctable = qdict_get_try_bool(qdict, "correctable", false);
+ } else {
+ if (qdict_haskey(qdict, "correctable")) {
+ error_setg(&err, "-c is only valid with numeric error status");
+ goto out;
+ }
}
aer_err.status = error_status;
aer_err.source_id = pci_requester_id(dev);
--
2.37.3
- [PULL 01/13] pci: Clean up a few things checkpatch.pl would flag later on, (continued)
- [PULL 01/13] pci: Clean up a few things checkpatch.pl would flag later on, Markus Armbruster, 2022/12/19
- [PULL 11/13] pci: Rename hmp_pcie_aer_inject_error()'s local variable @err, Markus Armbruster, 2022/12/19
- [PULL 10/13] pci: Inline do_pcie_aer_inject_error() into its only caller, Markus Armbruster, 2022/12/19
- [PULL 05/13] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI, Markus Armbruster, 2022/12/19
- [PULL 06/13] pci: Deduplicate get_class_desc(), Markus Armbruster, 2022/12/19
- [PULL 03/13] pci: Move HMP commands from monitor/ to new hw/pci/pci-hmp-cmds.c, Markus Armbruster, 2022/12/19
- [PULL 12/13] pci: Improve do_pcie_aer_inject_error()'s error messages, Markus Armbruster, 2022/12/19
- [PULL 09/13] pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c, Markus Armbruster, 2022/12/19
- [PULL 07/13] pci: Move pcibus_dev_print() to pci-hmp-cmds.c, Markus Armbruster, 2022/12/19
- [PULL 08/13] pci: Fix silent truncation of pcie_aer_inject_error argument, Markus Armbruster, 2022/12/19
- [PULL 13/13] pci: Reject pcie_aer_inject_error -c with symbolic error status,
Markus Armbruster <=
- Re: [PULL 00/13] Monitor patches for 2022-12-19, Peter Maydell, 2022/12/20