)]}'
{
  "commit": "320718ee074acce5ffced6506cb51af1388942aa",
  "tree": "0c57b9337452263e8f032cd0f37069f70921c490",
  "parents": [
    "b7a413015d2986edf020fba765c906cc9cbcbfc9"
  ],
  "author": {
    "name": "Anton Blanchard",
    "email": "anton@samba.org",
    "time": "Tue Apr 06 21:42:38 2010 +1000"
  },
  "committer": {
    "name": "Rusty Russell",
    "email": "rusty@rustcorp.com.au",
    "time": "Thu Apr 08 09:46:20 2010 +0930"
  },
  "message": "hvc_console: Fix race between hvc_close and hvc_remove\n\nI don\u0027t claim to understand the tty layer, but it seems like hvc_open and\nhvc_close should be balanced in their kref reference counting.\n\nRight now we get a kref every call to hvc_open:\n\n        if (hp-\u003ecount++ \u003e 0) {\n                tty_kref_get(tty); \u003c----- here\n                spin_unlock_irqrestore(\u0026hp-\u003elock, flags);\n                hvc_kick();\n                return 0;\n        } /* else count \u003d\u003d 0 */\n\n        tty-\u003edriver_data \u003d hp;\n\n        hp-\u003etty \u003d tty_kref_get(tty); \u003c------ or here if hp-\u003ecount was 0\n\nBut hvc_close has:\n\n        tty_kref_get(tty);\n\n        if (--hp-\u003ecount \u003d\u003d 0) {\n...\n                /* Put the ref obtained in hvc_open() */\n                tty_kref_put(tty);\n...\n        }\n\n        tty_kref_put(tty);\n\nSince the outside kref get/put balance we only do a single kref_put when\ncount reaches 0.\n\nThe patch below changes things to call tty_kref_put once for every\nhvc_close call, and with that my machine boots fine.\n\nSigned-off-by: Anton Blanchard \u003canton@samba.org\u003e\nAcked-by: Amit Shah \u003camit.shah@redhat.com\u003e\nSigned-off-by: Rusty Russell \u003crusty@rustcorp.com.au\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d3890e8d30e11ef8ba090481b6b1175553b7dd1a",
      "old_mode": 33188,
      "old_path": "drivers/char/hvc_console.c",
      "new_id": "35cca4c7fb186684aa41ef27228d85a932d97774",
      "new_mode": 33188,
      "new_path": "drivers/char/hvc_console.c"
    }
  ]
}
