)]}'
{
  "commit": "fa90e1c935472281de314e6d7c9a37db9cbc2e4e",
  "tree": "2c89c0038c640b6bdb5caaef00401f22553b118a",
  "parents": [
    "c290f8358acaeffd8e0c551ddcc24d1206143376"
  ],
  "author": {
    "name": "Jiri Slaby",
    "email": "jslaby@suse.cz",
    "time": "Wed Oct 12 11:32:43 2011 +0200"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@suse.de",
    "time": "Tue Oct 18 14:22:37 2011 -0700"
  },
  "message": "TTY: make tty_add_file non-failing\n\nIf tty_add_file fails at the point it is now, we have to revert all\nthe changes we did to the tty. It means either decrease all refcounts\nif this was a tty reopen or delete the tty if it was newly allocated.\n\nThere was a try to fix this in v3.0-rc2 using tty_release in 0259894c7\n(TTY: fix fail path in tty_open). But instead it introduced a NULL\ndereference. It\u0027s because tty_release dereferences\nfilp-\u003eprivate_data, but that one is set even in our tty_add_file. And\nwhen tty_add_file fails, it\u0027s still NULL/garbage. Hence tty_release\ncannot be called there.\n\nTo circumvent the original leak (and the current NULL deref) we split\ntty_add_file into two functions, making the latter non-failing. In\nthat case we may do the former early in open, where handling failures\nis easy. The latter stays as it is now. So there is no change in\nfunctionality.\n\nThe original bug (leak) was introduced by f573bd176 (tty: Remove\n__GFP_NOFAIL from tty_add_file()). Thanks Dan for reporting this.\n\nLater, we may split tty_release into more functions and call only some\nof them in this fail path instead. (If at all possible.)\n\nIntroduced-in: v2.6.37-rc2\nSigned-off-by: Jiri Slaby \u003cjslaby@suse.cz\u003e\nReported-by: Dan Carpenter \u003cdan.carpenter@oracle.com\u003e\nCc: stable \u003cstable@vger.kernel.org\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nCc: Pekka Enberg \u003cpenberg@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "98b6e3bdb000bda730a69a05680d76b8584f1715",
      "old_mode": 33188,
      "old_path": "drivers/tty/pty.c",
      "new_id": "7613f95f2d6b1d82e3297714701a35903d5885c9",
      "new_mode": 33188,
      "new_path": "drivers/tty/pty.c"
    },
    {
      "type": "modify",
      "old_id": "6913da8f202cd7fc4f82c33ead60c462dcf9e3a5",
      "old_mode": 33188,
      "old_path": "drivers/tty/tty_io.c",
      "new_id": "767ecbb4761a9b24eb1af90d58b72c83e8d14b05",
      "new_mode": 33188,
      "new_path": "drivers/tty/tty_io.c"
    },
    {
      "type": "modify",
      "old_id": "64c12a3e65f079a289d282c26b68291527307fb4",
      "old_mode": 33188,
      "old_path": "include/linux/tty.h",
      "new_id": "ff2925aa4e79a7e4388661c6005c7b5fef697325",
      "new_mode": 33188,
      "new_path": "include/linux/tty.h"
    }
  ]
}
