)]}'
{
  "commit": "d996b62a8df1d935b01319bf8defb95b5709f7b8",
  "tree": "d81f8240da776336845a2063555d7bb4dce684bd",
  "parents": [
    "ee2ffa0dfdd2db19705f2ba1c6a4c0bfe8122dd8"
  ],
  "author": {
    "name": "Nick Piggin",
    "email": "npiggin@kernel.dk",
    "time": "Wed Aug 18 04:37:36 2010 +1000"
  },
  "committer": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Wed Aug 18 08:35:47 2010 -0400"
  },
  "message": "tty: fix fu_list abuse\n\ntty: fix fu_list abuse\n\ntty code abuses fu_list, which causes a bug in remount,ro handling.\n\nIf a tty device node is opened on a filesystem, then the last link to the inode\nremoved, the filesystem will be allowed to be remounted readonly. This is\nbecause fs_may_remount_ro does not find the 0 link tty inode on the file sb\nlist (because the tty code incorrectly removed it to use for its own purpose).\nThis can result in a filesystem with errors after it is marked \"clean\".\n\nTaking idea from Christoph\u0027s initial patch, allocate a tty private struct\nat file-\u003eprivate_data and put our required list fields in there, linking\nfile and tty. This makes tty nodes behave the same way as other device nodes\nand avoid meddling with the vfs, and avoids this bug.\n\nThe error handling is not trivial in the tty code, so for this bugfix, I take\nthe simple approach of using __GFP_NOFAIL and don\u0027t worry about memory errors.\nThis is not a problem because our allocator doesn\u0027t fail small allocs as a rule\nanyway. So proper error handling is left as an exercise for tty hackers.\n\n[ Arguably filesystem\u0027s device inode would ideally be divorced from the\ndriver\u0027s pseudo inode when it is opened, but in practice it\u0027s not clear whether\nthat will ever be worth implementing. ]\n\nCc: linux-kernel@vger.kernel.org\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nCc: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\nSigned-off-by: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2c64faa8efa4527c9ec7d6c8f5e9f3ff72881250",
      "old_mode": 33188,
      "old_path": "drivers/char/pty.c",
      "new_id": "c350d01716bdace6ef510809e964a57c7129134b",
      "new_mode": 33188,
      "new_path": "drivers/char/pty.c"
    },
    {
      "type": "modify",
      "old_id": "cd5b829634eafaa65d8c6149c7435c37617608e8",
      "old_mode": 33188,
      "old_path": "drivers/char/tty_io.c",
      "new_id": "949067a0bd4743151515382b07ccf7aecad11316",
      "new_mode": 33188,
      "new_path": "drivers/char/tty_io.c"
    },
    {
      "type": "modify",
      "old_id": "6b706bc60a66bbb3cecb7477f2ea72e0a091aa84",
      "old_mode": 33188,
      "old_path": "fs/internal.h",
      "new_id": "6a5c13a80660ce22fe349f074413abe60c90751b",
      "new_mode": 33188,
      "new_path": "fs/internal.h"
    },
    {
      "type": "modify",
      "old_id": "5a9a9e5a37056fd7535bdc3e98b24ed14118f1a5",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "5e65add0f1631632fbbb5f17347a3e1e2aaffea7",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    },
    {
      "type": "modify",
      "old_id": "f6b371a2514e4a1a6131e83efbf78bc16cad2a90",
      "old_mode": 33188,
      "old_path": "include/linux/tty.h",
      "new_id": "67d64e6efe7a8c95d775b6418d2c1c8d728d667d",
      "new_mode": 33188,
      "new_path": "include/linux/tty.h"
    },
    {
      "type": "modify",
      "old_id": "bd7da0f0ccf3f58a72784c1ed0e2042eb8cd1b38",
      "old_mode": 33188,
      "old_path": "security/selinux/hooks.c",
      "new_id": "4796ddd4e721ae454a02563d713aa235870ece02",
      "new_mode": 33188,
      "new_path": "security/selinux/hooks.c"
    }
  ]
}
