qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f3b2be: hw/usb/bus: Remove bad object_unparen


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] f3b2be: hw/usb/bus: Remove bad object_unparent() from usb_...
Date: Thu, 05 Oct 2017 08:05:10 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f3b2bea3c76ba9283b957f1373e7cebdbf863059
      
https://github.com/qemu/qemu/commit/f3b2bea3c76ba9283b957f1373e7cebdbf863059
  Author: Thomas Huth <address@hidden>
  Date:   2017-09-29 (Fri, 29 Sep 2017)

  Changed paths:
    M hw/usb/bus.c

  Log Message:
  -----------
  hw/usb/bus: Remove bad object_unparent() from usb_try_create_simple()

Valgrind detects an invalid read operation when hot-plugging of an
USB device fails:

$ valgrind x86_64-softmmu/qemu-system-x86_64 -device usb-ehci -nographic -S
==30598== Memcheck, a memory error detector
==30598== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==30598== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==30598== Command: x86_64-softmmu/qemu-system-x86_64 -device usb-ehci 
-nographic -S
==30598==
QEMU 2.10.50 monitor - type 'help' for more information
(qemu) device_add usb-tablet
(qemu) device_add usb-tablet
(qemu) device_add usb-tablet
(qemu) device_add usb-tablet
(qemu) device_add usb-tablet
(qemu) device_add usb-tablet
==30598== Invalid read of size 8
==30598==    at 0x60EF50: object_unparent (object.c:445)
==30598==    by 0x580F0D: usb_try_create_simple (bus.c:346)
==30598==    by 0x581BEB: usb_claim_port (bus.c:451)
==30598==    by 0x582310: usb_qdev_realize (bus.c:257)
==30598==    by 0x4CB399: device_set_realized (qdev.c:914)
==30598==    by 0x60E26D: property_set_bool (object.c:1886)
==30598==    by 0x61235E: object_property_set_qobject (qom-qobject.c:27)
==30598==    by 0x61000F: object_property_set_bool (object.c:1162)
==30598==    by 0x4567C3: qdev_device_add (qdev-monitor.c:630)
==30598==    by 0x456D52: qmp_device_add (qdev-monitor.c:807)
==30598==    by 0x470A99: hmp_device_add (hmp.c:1933)
==30598==    by 0x3679C3: handle_hmp_command (monitor.c:3123)

The object_unparent() here is not necessary anymore since commit
69382d8b3e8600b3 ("qdev: Fix object reference leak in case device.realize()
fails"), so let's remove it now.

Suggested-by: Paolo Bonzini <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 275d477a1adb084a47859507b20b05e7d65f8e8d
      
https://github.com/qemu/qemu/commit/275d477a1adb084a47859507b20b05e7d65f8e8d
  Author: Gerd Hoffmann <address@hidden>
  Date:   2017-09-29 (Fri, 29 Sep 2017)

  Changed paths:
    M hw/usb/Makefile.objs

  Log Message:
  -----------
  usb: fix libusb config variable name.

Cc: Jan Kiszka <address@hidden>
Fixes: 4e5ee5b21c84fe3023a64b5cc2e12a52ab0597c1
Signed-off-by: Gerd Hoffmann <address@hidden>
Tested-by: Jan Kiszka <address@hidden>
Message-id: address@hidden


  Commit: 13787d59cf86bac230c4d3eec3580110f53ac113
      
https://github.com/qemu/qemu/commit/13787d59cf86bac230c4d3eec3580110f53ac113
  Author: Fam Zheng <address@hidden>
  Date:   2017-09-29 (Fri, 29 Sep 2017)

  Changed paths:
    M hw/usb/ccid-card-passthru.c

  Log Message:
  -----------
  usb: Use angle brackets for cacard include directive

This is a library header, so angle brackets are more appropriate; also
move the line to before QEMU headers, as is recommended in HACKING.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: eea6ae20379dca837631d603c3bed03e5128189f
      
https://github.com/qemu/qemu/commit/eea6ae20379dca837631d603c3bed03e5128189f
  Author: Gerd Hoffmann <address@hidden>
  Date:   2017-10-05 (Thu, 05 Oct 2017)

  Changed paths:
    M hw/usb/Makefile.objs

  Log Message:
  -----------
  usb: fix host-stub.c build race

Suggested-by: Thomas Huth <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-id: address@hidden


  Commit: f43a46f0f43db5449a14813fab521590a8103ce4
      
https://github.com/qemu/qemu/commit/f43a46f0f43db5449a14813fab521590a8103ce4
  Author: Peter Maydell <address@hidden>
  Date:   2017-10-05 (Thu, 05 Oct 2017)

  Changed paths:
    M hw/usb/Makefile.objs
    M hw/usb/bus.c
    M hw/usb/ccid-card-passthru.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kraxel/tags/usb-20171005-pull-request' 
into staging

usb bugfixes.

# gpg: Signature made Thu 05 Oct 2017 10:04:15 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>"
# gpg:                 aka "Gerd Hoffmann <address@hidden>"
# gpg:                 aka "Gerd Hoffmann (private) <address@hidden>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20171005-pull-request:
  usb: fix host-stub.c build race
  usb: Use angle brackets for cacard include directive
  usb: fix libusb config variable name.
  hw/usb/bus: Remove bad object_unparent() from usb_try_create_simple()

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/1fdc4c5d82a6...f43a46f0f43d

reply via email to

[Prev in Thread] Current Thread [Next in Thread]