)]}'
{
  "commit": "9c225f2655e36a470c4f58dbbc99244c5fc7f2d4",
  "tree": "7cb89dbc82ee1b533ff2d097fed6a4248374bd4b",
  "parents": [
    "1b56e98990bcdbb20b9fab163654b9315bf158e8"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Mar 03 09:36:58 2014 -0800"
  },
  "committer": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Mon Mar 10 11:44:41 2014 -0400"
  },
  "message": "vfs: atomic f_pos accesses as per POSIX\n\nOur write() system call has always been atomic in the sense that you get\nthe expected thread-safe contiguous write, but we haven\u0027t actually\nguaranteed that concurrent writes are serialized wrt f_pos accesses, so\nthreads (or processes) that share a file descriptor and use \"write()\"\nconcurrently would quite likely overwrite each others data.\n\nThis violates POSIX.1-2008/SUSv4 Section XSI 2.9.7 that says:\n\n \"2.9.7 Thread Interactions with Regular File Operations\n\n  All of the following functions shall be atomic with respect to each\n  other in the effects specified in POSIX.1-2008 when they operate on\n  regular files or symbolic links: [...]\"\n\nand one of the effects is the file position update.\n\nThis unprotected file position behavior is not new behavior, and nobody\nhas ever cared.  Until now.  Yongzhi Pan reported unexpected behavior to\nMichael Kerrisk that was due to this.\n\nThis resolves the issue with a f_pos-specific lock that is taken by\nread/write/lseek on file descriptors that may be shared across threads\nor processes.\n\nReported-by: Yongzhi Pan \u003cpanyongzhi@gmail.com\u003e\nReported-by: Michael Kerrisk \u003cmtk.manpages@gmail.com\u003e\nCc: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5fff9030be34df26aff0c0ed56081aee1306bf02",
      "old_mode": 33188,
      "old_path": "fs/file_table.c",
      "new_id": "5b24008ea4f678b668ff2a52fa41f1812b579645",
      "new_mode": 33188,
      "new_path": "fs/file_table.c"
    },
    {
      "type": "modify",
      "old_id": "385f7817bfccbd12fbc352c39827586d4cf953d7",
      "old_mode": 33188,
      "old_path": "fs/namei.c",
      "new_id": "2f730ef9b4b3da78afd6a830c13c7ba13c706ffe",
      "new_mode": 33188,
      "new_path": "fs/namei.c"
    },
    {
      "type": "modify",
      "old_id": "4b3e1edf2fe4d917e69e56b3e268e32f2ae7301a",
      "old_mode": 33188,
      "old_path": "fs/open.c",
      "new_id": "b9ed8b25c108c69d68889b5b6eadac9878eb7bd9",
      "new_mode": 33188,
      "new_path": "fs/open.c"
    },
    {
      "type": "modify",
      "old_id": "edc5746a902a090ce4dbda6b8b1205e729dff5b3",
      "old_mode": 33188,
      "old_path": "fs/read_write.c",
      "new_id": "932bb3414a967a401edb671c9fc526b0f9e2dd55",
      "new_mode": 33188,
      "new_path": "fs/read_write.c"
    },
    {
      "type": "modify",
      "old_id": "cbacf4faf447a9dd2b3fd50d3dc2e4f86a120e67",
      "old_mode": 33188,
      "old_path": "include/linux/file.h",
      "new_id": "f2517fa2d610524b9f887fb4fda11445220ffb1f",
      "new_mode": 33188,
      "new_path": "include/linux/file.h"
    },
    {
      "type": "modify",
      "old_id": "60829565e5522a2c68f489665909d39f65230a25",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "ebfde04bca0683f1e2ecd2aa5c273b943eb7dfb9",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    }
  ]
}
