diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2021-07-19 11:34:08 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2021-07-19 11:34:08 +0100 |
| commit | 7457b407edd6e8555e4b46488aab2f13959fccf8 (patch) | |
| tree | c94429d30a760cfa44e04aad3c263e4a6f79bbbc /hw/net/net_tx_pkt.c | |
| parent | fd79f89c76c8e2f409dd9db5d7a367b1f64b6dc6 (diff) | |
| parent | 9405d87be25db6dff4d7b5ab48a81bbf6d083e47 (diff) | |
| download | focaccia-qemu-7457b407edd6e8555e4b46488aab2f13959fccf8.tar.gz focaccia-qemu-7457b407edd6e8555e4b46488aab2f13959fccf8.zip | |
Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-07-19' into staging
- Compile-test the Windows installer in the Gitlab-CI - Fix endianess detection problem with LTO in "configure" - Fix two abort()s in the vmxnet code - Fix crash with x-remote machine and IDE devices # gpg: Signature made Mon 19 Jul 2021 10:47:12 BST # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/thuth-gitlab/tags/pull-request-2021-07-19: hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine hw/net/net_tx_pkt: Fix crash detected by fuzzer hw/net/vmxnet3: Do not abort if the guest is trying to use an invalid TX queue configure: Fix endianess test with LTO ci: build & store windows installer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/net/net_tx_pkt.c')
| -rw-r--r-- | hw/net/net_tx_pkt.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c index 1f9aa59eca..1cb1125d9f 100644 --- a/hw/net/net_tx_pkt.c +++ b/hw/net/net_tx_pkt.c @@ -450,11 +450,13 @@ void net_tx_pkt_reset(struct NetTxPkt *pkt) pkt->payload_len = 0; pkt->payload_frags = 0; - assert(pkt->raw); - for (i = 0; i < pkt->raw_frags; i++) { - assert(pkt->raw[i].iov_base); - pci_dma_unmap(pkt->pci_dev, pkt->raw[i].iov_base, pkt->raw[i].iov_len, - DMA_DIRECTION_TO_DEVICE, 0); + if (pkt->max_raw_frags > 0) { + assert(pkt->raw); + for (i = 0; i < pkt->raw_frags; i++) { + assert(pkt->raw[i].iov_base); + pci_dma_unmap(pkt->pci_dev, pkt->raw[i].iov_base, + pkt->raw[i].iov_len, DMA_DIRECTION_TO_DEVICE, 0); + } } pkt->raw_frags = 0; |