)]}'
{
  "commit": "d2e4d08b3e02deb2d5824b17283c63c1354b7696",
  "tree": "3ae10bb0adbbc0f40de5fcfde0dbf725497843cb",
  "parents": [
    "f26e428da505709ec03b2ed2c9eb3db82b30bd7b"
  ],
  "author": {
    "name": "Luiz Capitulino",
    "email": "lcapitulino@redhat.com",
    "time": "Fri Jun 17 15:58:08 2011 -0300"
  },
  "committer": {
    "name": "Amit Shah",
    "email": "amit.shah@redhat.com",
    "time": "Mon Jun 27 15:04:54 2011 +0530"
  },
  "message": "virtio-serial: Fix segfault on guest boot\n\nIf I start qemu with:\n\n  # qemu -hda disks/test.img -enable-kvm -m 1G -snapshot \\\n         -device virtio-serial \\\n         -chardev socket,host\u003dlocalhost,port\u003d1234,server,nowait,id\u003dfoo \\\n         -device virtserialport,chardev\u003dfoo,name\u003dorg.qemu.guest_agent\n\nI get a segfault when booting a Fedora 14 guest. The backtrace says:\n\n  Program terminated with signal 11, Segmentation fault.\n    #0  0x0000000000420850 in handle_control_message (vser\u003d0x3732bd0, buf\u003d0x2c173e0, len\u003d8) at /home/lcapitulino/src/qmp-unstable/hw/virtio-serial-bus.c:335\n    335     info \u003d DO_UPCAST(VirtIOSerialPortInfo, qdev, port-\u003edev.info);\n\nWhat\u0027s happening is VIRTIO_CONSOLE_DEVICE_READY is a message for the\nwhole device, not for an individual port. So port is NULL. This bug was\nintroduced by commit a15bb0d6a981de749452a5180fc8084d625671da.\n\nThis commit fixes that by making the port returned by find_port_by_id()\nbe used only by the VIRTIO_CONSOLE_PORT_READY and\nVIRTIO_CONSOLE_PORT_OPEN messages.\n\nSigned-off-by: Luiz Capitulino \u003clcapitulino@redhat.com\u003e\nReviewed-by: Markus Armbruster \u003carmbru@redhat.com\u003e\nSigned-off-by: Amit Shah \u003camit.shah@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9a121049828b2d9cde1f4da21778536a398dc659",
      "old_mode": 33188,
      "old_path": "hw/virtio-serial-bus.c",
      "new_id": "7cedf1855dbd37dcb37befc61d9644dc48170baa",
      "new_mode": 33188,
      "new_path": "hw/virtio-serial-bus.c"
    }
  ]
}
