)]}'
{
  "commit": "12b2e9f30f978f26f35f9df5c2ef96fbc019bab6",
  "tree": "9fe1c09e733beecb3164acc6406e200a79fb17fa",
  "parents": [
    "9b748c5e061b1202fba59afd857e16a693743d90"
  ],
  "author": {
    "name": "Tony Krowiak",
    "email": "akrowiak@linux.ibm.com",
    "time": "Mon Dec 17 10:57:30 2018 -0500"
  },
  "committer": {
    "name": "Eduardo Habkost",
    "email": "ehabkost@redhat.com",
    "time": "Wed Mar 06 11:51:08 2019 -0300"
  },
  "message": "qdev/core: fix qbus_is_full()\n\nThe qbus_is_full(BusState *bus) function (qdev_monitor.c) compares the max_index\nvalue of the BusState structure with the max_dev value of the BusClass structure\nto determine whether the maximum number of children has been reached for the\nbus. The problem is, the max_index field of the BusState structure does not\nnecessarily reflect the number of devices that have been plugged into\nthe bus.\n\nWhenever a child device is plugged into the bus, the bus\u0027s max_index value is\nassigned to the child device and then incremented. If the child is subsequently\nunplugged, the value of the max_index does not change and no longer reflects the\nnumber of children.\n\nWhen the bus\u0027s max_index value reaches the maximum number of devices\nallowed for the bus (i.e., the max_dev field in the BusClass structure),\nattempts to plug another device will be rejected claiming that the bus is\nfull -- even if the bus is actually empty.\n\nTo resolve the problem, a new \u0027num_children\u0027 field is being added to the\nBusState structure to keep track of the number of children plugged into the\nbus. It will be incremented when a child is plugged, and decremented when a\nchild is unplugged.\n\nSigned-off-by: Tony Krowiak \u003cakrowiak@linux.ibm.com\u003e\nReviewed-by: Pierre Morel\u003cpmorel@linux.ibm.com\u003e\nReviewed-by: Halil Pasic \u003cpasic@linux.ibm.com\u003e\nMessage-Id: \u003c1545062250-7573-1-git-send-email-akrowiak@linux.ibm.com\u003e\nReviewed-by: Igor Mammedov \u003cimammedo@redhat.com\u003e\nSigned-off-by: Eduardo Habkost \u003cehabkost@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d59071b8ed6e737e10d464c4400f42e55415085d",
      "old_mode": 33188,
      "old_path": "hw/core/qdev.c",
      "new_id": "00a5a39c763246351a08257b5c1c277ee134e819",
      "new_mode": 33188,
      "new_path": "hw/core/qdev.c"
    },
    {
      "type": "modify",
      "old_id": "e70a4bfa498f5e2c7442cab53ce3d636f20df193",
      "old_mode": 33188,
      "old_path": "include/hw/qdev-core.h",
      "new_id": "35b8154e8b4f1c4c8cbdef452d75a3ae3e3fcb2b",
      "new_mode": 33188,
      "new_path": "include/hw/qdev-core.h"
    },
    {
      "type": "modify",
      "old_id": "07147c63bf8ba74b77f011b6bf8bb9f257d56ba5",
      "old_mode": 33188,
      "old_path": "qdev-monitor.c",
      "new_id": "45a8ba49644cab99f1adbaab4f0619e77a4b3b1d",
      "new_mode": 33188,
      "new_path": "qdev-monitor.c"
    }
  ]
}
