qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 193982: pci: Only unmap bus_master_enabled_re


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 193982: pci: Only unmap bus_master_enabled_region if was a...
Date: Tue, 04 Apr 2017 10:00:11 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 193982c6f9424779b53a168fe32ebc30a776cbf1
      
https://github.com/qemu/qemu/commit/193982c6f9424779b53a168fe32ebc30a776cbf1
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-04-04 (Tue, 04 Apr 2017)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: Only unmap bus_master_enabled_region if was added previously

Normally pci_init_bus_master() would be called either via
bus->machine_done.notify or directly from do_pci_register_device().

However if a device's realize() failed, pci_init_bus_master() is not
called, and do_pci_unregister_device() fails on
memory_region_del_subregion() as it was not mapped.

This adds a check that subregion was mapped before unmapping it.

Fixes: c53598ed18e4 ("pci: Add missing drop of bus master AS reference")
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Tested-by: John Snow <address@hidden>


  Commit: 2c9938c5d71a634fd71c731658f57d9ba6299bad
      
https://github.com/qemu/qemu/commit/2c9938c5d71a634fd71c731658f57d9ba6299bad
  Author: Peter Maydell <address@hidden>
  Date:   2017-04-04 (Tue, 04 Apr 2017)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pci: fix

A single bugfix for a error handling issue in pci.

Signed-off-by: Michael S. Tsirkin <address@hidden>

# gpg: Signature made Tue 04 Apr 2017 16:33:04 BST
# gpg:                using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  pci: Only unmap bus_master_enabled_region if was added previously

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


Compare: https://github.com/qemu/qemu/compare/fa902c8ca0f3...2c9938c5d71a

reply via email to

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