)]}'
{
  "commit": "9561fda8d90e176bef598ba87c42a1bd6ad03ef7",
  "tree": "ca7896ed13382ba841ec2af894b1cee65c1a3dae",
  "parents": [
    "c6aed9833419eed9de19919ff31aa021a6171521"
  ],
  "author": {
    "name": "Stefan Hajnoczi",
    "email": "stefanha@redhat.com",
    "time": "Wed Mar 19 08:58:55 2014 +0100"
  },
  "committer": {
    "name": "Andreas Färber",
    "email": "afaerber@suse.de",
    "time": "Wed Mar 19 22:05:20 2014 +0100"
  },
  "message": "qom: Make QOM link property unref optional\n\nSome object_property_add_link() callers expect property deletion to\nunref the link property object.  Other callers expect to manage the\nrefcount themselves.  The former are currently broken and therefore leak\nthe link property object.\n\nThis patch adds a flags argument to object_property_add_link() so the\ncaller can specify which refcount behavior they require.  The new\nOBJ_PROP_LINK_UNREF_ON_RELEASE flag causes the link pointer to be\nunreferenced when the property is deleted.\n\nThis fixes refcount leaks in qdev.c, xilinx_axidma.c, xilinx_axienet.c,\ns390-virtio-bus.c, virtio-pci.c, virtio-rng.c, and ui/console.c.\n\nRationale for refcount behavior:\n\n * hw/core/qdev.c\n   - bus children are explicitly unreferenced, don\u0027t interfere\n   - parent_bus is essentially a read-only property that doesn\u0027t hold a\n     refcount, don\u0027t unref\n   - hotplug_handler is leaked, do unref\n\n * hw/dma/xilinx_axidma.c\n   - rx stream \"dma\" links are set using set_link, therefore they\n     need unref\n   - tx streams are set using set_link, therefore they need unref\n\n * hw/net/xilinx_axienet.c\n   - same reasoning as hw/dma/xilinx_axidma.c\n\n * hw/pcmcia/pxa2xx.c\n   - pxa2xx bypasses set_link and therefore does not use refcounts\n\n * hw/s390x/s390-virtio-bus.c\n * hw/virtio/virtio-pci.c\n * hw/virtio/virtio-rng.c\n * ui/console.c\n   - set_link is used and there is no explicit unref, do unref\n\nCc: Peter Crosthwaite \u003cpeter.crosthwaite@petalogix.com\u003e\nCc: Alexander Graf \u003cagraf@suse.de\u003e\nCc: Anthony Liguori \u003caliguori@amazon.com\u003e\nCc: \"Michael S. Tsirkin\" \u003cmst@redhat.com\u003e\nSigned-off-by: Stefan Hajnoczi \u003cstefanha@redhat.com\u003e\nReviewed-by: Paolo Bonzini \u003cpbonzini@redhat.com\u003e\nSigned-off-by: Andreas Färber \u003cafaerber@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9f0a522ee8749e3495064ca83e052e04b4b791b6",
      "old_mode": 33188,
      "old_path": "hw/core/qdev.c",
      "new_id": "a182917222fcffd4a3ea2dcca702560fe94a37e3",
      "new_mode": 33188,
      "new_path": "hw/core/qdev.c"
    },
    {
      "type": "modify",
      "old_id": "19f07b3b25fd5a22137199fe4592b49c5662288d",
      "old_mode": 33188,
      "old_path": "hw/dma/xilinx_axidma.c",
      "new_id": "c8fda391228e6e7241a6b59a4d88ebb72bbb4438",
      "new_mode": 33188,
      "new_path": "hw/dma/xilinx_axidma.c"
    },
    {
      "type": "modify",
      "old_id": "0bd5eda199d7e4281a69cce422b146fc8a55f213",
      "old_mode": 33188,
      "old_path": "hw/net/xilinx_axienet.c",
      "new_id": "7ecf9251a76bcb550c877324d60455e3a3b7b797",
      "new_mode": 33188,
      "new_path": "hw/net/xilinx_axienet.c"
    },
    {
      "type": "modify",
      "old_id": "8f17596cc3684ac3312edd70372fa517aceaa9ba",
      "old_mode": 33188,
      "old_path": "hw/pcmcia/pxa2xx.c",
      "new_id": "6949214df35dac0e1a86722c7ceb0d05062778b9",
      "new_mode": 33188,
      "new_path": "hw/pcmcia/pxa2xx.c"
    },
    {
      "type": "modify",
      "old_id": "e4fc35366b2ee5f87e9a111c4b5207308a116cd4",
      "old_mode": 33188,
      "old_path": "hw/s390x/s390-virtio-bus.c",
      "new_id": "930b4f7cd011093d6545a832868b6bc158fa66f8",
      "new_mode": 33188,
      "new_path": "hw/s390x/s390-virtio-bus.c"
    },
    {
      "type": "modify",
      "old_id": "a01801e342ba7a2cf6c83c52968e512007dbfdde",
      "old_mode": 33188,
      "old_path": "hw/s390x/virtio-ccw.c",
      "new_id": "aebb2dec6dda0ab8bacf84169b7736d9f85941f0",
      "new_mode": 33188,
      "new_path": "hw/s390x/virtio-ccw.c"
    },
    {
      "type": "modify",
      "old_id": "7b91841a1df5edb32a347503d41fa509ca9a7141",
      "old_mode": 33188,
      "old_path": "hw/virtio/virtio-pci.c",
      "new_id": "eebb819d9876332ecf71e59193fa56a4690d66ca",
      "new_mode": 33188,
      "new_path": "hw/virtio/virtio-pci.c"
    },
    {
      "type": "modify",
      "old_id": "a16e3bc52e6140a29dabd6e43d671c3a5e52596f",
      "old_mode": 33188,
      "old_path": "hw/virtio/virtio-rng.c",
      "new_id": "2efda8b4437aa80fb9bca96fd85585ee4a5dfd16",
      "new_mode": 33188,
      "new_path": "hw/virtio/virtio-rng.c"
    },
    {
      "type": "modify",
      "old_id": "4cd77049e4ee5d314f53a022e65410a07c2dd9e0",
      "old_mode": 33188,
      "old_path": "include/qom/object.h",
      "new_id": "9feb4419862cd36c1f8f5b61487d5b3bf0bae23a",
      "new_mode": 33188,
      "new_path": "include/qom/object.h"
    },
    {
      "type": "modify",
      "old_id": "cc946d9dacff2dd8cc3f4901bd83fad3e7683d03",
      "old_mode": 33188,
      "old_path": "qom/object.c",
      "new_id": "9e22f11e21d7ab4635b360563e923ca962db323e",
      "new_mode": 33188,
      "new_path": "qom/object.c"
    },
    {
      "type": "modify",
      "old_id": "4df251d57973d3e9ece7f6ce0faf0744a19f387c",
      "old_mode": 33188,
      "old_path": "ui/console.c",
      "new_id": "9974212409b73eb9f4e23d0e12c56f5e43f5bec1",
      "new_mode": 33188,
      "new_path": "ui/console.c"
    }
  ]
}
