[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 4dbac1: net/virtio: Drop useless n->primary_d
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 4dbac1: net/virtio: Drop useless n->primary_dev not null c... |
Date: |
Mon, 02 Dec 2019 09:09:15 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 4dbac1aed2ca7e68e9384b0e49750d54d4cbd43d
https://github.com/qemu/qemu/commit/4dbac1aed2ca7e68e9384b0e49750d54d4cbd43d
Author: Markus Armbruster <address@hidden>
Date: 2019-12-02 (Mon, 02 Dec 2019)
Changed paths:
M hw/net/virtio-net.c
Log Message:
-----------
net/virtio: Drop useless n->primary_dev not null checks
virtio_net_handle_migration_primary() returns early when it can't
ensure n->primary_dev is non-null. Checking it again right after that
early return is redundant. Drop.
If n->primary_dev is null on entering failover_replug_primary(), @pdev
will become null, and pdev->partially_hotplugged will crash. Checking
n->primary_dev later is useless. It can't actually be null, because
its caller virtio_net_handle_migration_primary() ensures it isn't.
Drop the useless check.
Cc: Jens Freimann <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Jens Freimann <address@hidden>
Commit: 5a0948d36c4cbc1c5534afac6fee99de55245d12
https://github.com/qemu/qemu/commit/5a0948d36c4cbc1c5534afac6fee99de55245d12
Author: Markus Armbruster <address@hidden>
Date: 2019-12-02 (Mon, 02 Dec 2019)
Changed paths:
M hw/net/virtio-net.c
Log Message:
-----------
net/virtio: Fix failover error handling crash bugs
Functions that take an Error ** parameter to pass an error to the
caller expect the parameter to point to null.
failover_replug_primary() violates this precondition in several
places:
* After qemu_opts_from_qdict() failed, *errp is no longer null.
Passing it to error_setg() is wrong, and will trip the assertion in
error_setv(). Messed up in commit 150ab54aa6 "net/virtio: fix
re-plugging of primary device". Simply drop the error_setg().
* Passing @errp to qemu_opt_set_bool(), hotplug_handler_pre_plug(),
and hotplug_handler_plug() is wrong. If one of the first two fails,
*errp is no longer null. Risks tripping the same assertion.
Moreover, continuing after such errors is unsafe. Messed up in
commit 9711cd0dfc "net/virtio: add failover support". Fix by
handling each error properly.
failover_replug_primary() crashes when passed a null @errp. Also
messed up in commit 9711cd0dfc. This bug can't bite as no caller
actually passes null. Fix it anyway.
Fixes: 9711cd0dfc3fa414f7f64935713c07134ae67971
Fixes: 150ab54aa6934583180f88a2bd540bc6fc4fbff3
Cc: Jens Freimann <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Jens Freimann <address@hidden>
Commit: cb09104ea8418d9521d9a9d36ea0527b84ce51ac
https://github.com/qemu/qemu/commit/cb09104ea8418d9521d9a9d36ea0527b84ce51ac
Author: Markus Armbruster <address@hidden>
Date: 2019-12-02 (Mon, 02 Dec 2019)
Changed paths:
M block/file-posix.c
Log Message:
-----------
block/file-posix: Fix laio_init() error handling crash bug
raw_aio_attach_aio_context() passes uninitialized Error *local_err by
reference to laio_init() via aio_setup_linux_aio(). When laio_init()
fails, it passes it on to error_setg_errno(), tripping error_setv()'s
assertion unless @local_err is null by dumb luck.
Fix by initializing @local_err properly.
Fixes: ed6e2161715c527330f936d44af4c547f25f687e
Cc: Nishanth Aravamudan <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Kevin Wolf <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Commit: 39032981fa851d25fb27527f25f046fed800e585
https://github.com/qemu/qemu/commit/39032981fa851d25fb27527f25f046fed800e585
Author: Peter Maydell <address@hidden>
Date: 2019-12-02 (Mon, 02 Dec 2019)
Changed paths:
M block/file-posix.c
M hw/net/virtio-net.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2019-12-02' into
staging
Error reporting patches for 2019-12-02
# gpg: Signature made Mon 02 Dec 2019 15:17:45 GMT
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "address@hidden"
# gpg: Good signature from "Markus Armbruster <address@hidden>" [full]
# gpg: aka "Markus Armbruster <address@hidden>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-error-2019-12-02:
block/file-posix: Fix laio_init() error handling crash bug
net/virtio: Fix failover error handling crash bugs
net/virtio: Drop useless n->primary_dev not null checks
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/fb2246882a2c...39032981fa85
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 4dbac1: net/virtio: Drop useless n->primary_dev not null c...,
Peter Maydell <=