xen queue for 5.0
The following changes since commit 8f0d25c464a1989d606f7b988d07b1147dfcde33:
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/acceptance-fixes-20200407' into staging (2020-04-07 15:10:11 +0100)
are available in the Git repository at:
https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20200407
for you to fetch changes up to 758af9cfabfb000eb00e42b9738e655b18fdd812:
MAINTAINERS: Add xen-usb.c to Xen section (2020-04-07 16:13:26 +0100)
----------------------------------------------------------------
Xen queue for QEMU 5.0
- Fix for xen-block.
- A fix for a Coverity false positive in xen-usb.
- Update MAINTAINERS to add xen-usb.c to Xen section.
----------------------------------------------------------------
Anthony PERARD (2):
xen-block: Fix uninitialized variable
MAINTAINERS: Add xen-usb.c to Xen section
Peter Maydell (1):
hw/usb/xen-usb.c: Pass struct usbback_req* to usbback_packet_complete()
MAINTAINERS | 1 + hw/block/xen-block.c | 2 +- hw/usb/xen-usb.c | 10 ++++------ 3 files changed, 6 insertions(+), 7 deletions(-)
[PULL 2/3] xen-block: Fix uninitialized variable
Since 7f5d9b206d1e ("object-add: don't create return value if failed"), qmp_object_add() don't write any value in 'ret_data', thus has random data. Then qobject_unref() fails and abort().
Fix by initialising 'ret_data' properly.
Message-Id: <[email protected]>
--- hw/block/xen-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/block/xen-block.c +1 -1
@@ -860,7 +860,7 @@ static XenBlockIOThread *xen_block_iothread_create(const char *id,XenBlockIOThread *iothread =g_new (XenBlockIOThread,1 );Error *local_err =NULL ;QDict *opts; -QObject *ret_data; +QObject *ret_data =NULL ; iothread->id =g_strdup (id);
Signature · 1 line
Anthony PERARD
[PULL 1/3] hw/usb/xen-usb.c: Pass struct usbback_req* to usbback_packet_complete()
In reply to Anthony PERARDFrom: Peter Maydell <[email protected]>
The function usbback_packet_complete() currently takes a USBPacket*, which must be a pointer to the packet field within a struct usbback_req; the function uses container_of() to get the struct usbback_req* given the USBPacket*.
This is unnecessarily confusing (and in particular it confuses the Coverity Scan analysis, resulting in the false positive CID 1421919 where it thinks that we write off the end of the structure). Since both callsites already have the pointer to the struct usbback_req, just pass that in directly.
Message-Id: <[email protected]>
--- hw/usb/xen-usb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
hw/usb/xen-usb.c +4 -6
@@ -347,13 +347,11 @@ static int32_t usbback_xlat_status(int status)return -ESHUTDOWN ; } -static void usbback_packet_complete (USBPacket *packet) +static void usbback_packet_complete (struct usbback_req *usbback_req) { -struct usbback_req *usbback_req; +USBPacket *packet = &usbback_req->packet;int32_t status; - usbback_req = container_of(packet, struct usbback_req, packet); -QTAILQ_REMOVE (&usbback_req->stub->submit_q, usbback_req, q); status =usbback_xlat_status (packet->status);
@@ -566,7 +564,7 @@ static void usbback_dispatch(struct usbback_req *usbback_req)usb_handle_packet (usbback_req->stub->dev, &usbback_req->packet);if (usbback_req->packet.status !=USB_RET_ASYNC ) { -usbback_packet_complete (&usbback_req->packet); +usbback_packet_complete (usbback_req); }return ;
@@ -993,7 +991,7 @@ static void xen_bus_complete(USBPort *port, USBPacket *packet) usbif = usbback_req->usbif;TR_REQ (&usbif->xendev,"\n" ); -usbback_packet_complete (packet); +usbback_packet_complete (usbback_req); }static USBPortOps xen_usb_port_ops = {
Signature · 1 line
Anthony PERARD
[PULL 3/3] MAINTAINERS: Add xen-usb.c to Xen section
In reply to Anthony PERARDMessage-Id: <[email protected]>
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -440,6 +440,7 @@ F: hw/9pfs/xen-9p* F: hw/char/xen_console.c F: hw/display/xenfb.c F: hw/net/xen_nic.c +F: hw/usb/xen-usb.c F: hw/block/xen* F: hw/block/dataplane/xen* F: hw/xen/
Signature · 1 line
Anthony PERARD
Peter Maydell
AppliedQuoted 11 lines · Anthony PERARD
The following changes since commit
8f0d25c464a1989d606f7b988d07b1147dfcde33:Merge remote-tracking branch 'remotes/philmd-gitlab/tags/acceptance-fixes-20200407' into staging (2020-04-07 15:10:11 +0100)
are available in the Git repository at:
https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20200407
for you to fetch changes up to
758af9cfabfb000eb00e42b9738e655b18fdd812:
Quoted 9 lines
MAINTAINERS: Addxen-usb.cto Xen section (2020-04-07 16:13:26 +0100)----------------------------------------------------------------
Xen queue for QEMU 5.0- Fix for xen-block.
- A fix for a Coverity false positive in xen-usb.
- UpdateMAINTAINERSto addxen-usb.cto Xen section.
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.
-- PMM