)]}'
{
  "commit": "3bfa7e141b0bbb818b25e0daafb65aee92e49ac4",
  "tree": "3dc8c16fe3634a8a0e40e1e3039cf3a24c62f609",
  "parents": [
    "cb8d9937e85559ea0ad1f4f83df8ad1288fed47d"
  ],
  "author": {
    "name": "Vasily Averin",
    "email": "vvs@virtuozzo.com",
    "time": "Fri Apr 10 14:34:06 2020 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Apr 10 15:36:22 2020 -0700"
  },
  "message": "fs/seq_file.c: seq_read(): add info message about buggy .next functions\n\nPatch series \"seq_file .next functions should increase position index\".\n\nIn Aug 2018 NeilBrown noticed commit 1f4aace60b0e (\"fs/seq_file.c:\nsimplify seq_file iteration code and interface\")\n\n\"Some -\u003enext functions do not increment *pos when they return NULL...\nNote that such -\u003enext functions are buggy and should be fixed.  A simple\ndemonstration is dd if\u003d/proc/swaps bs\u003d1000 skip\u003d1 Choose any block size\nlarger than the size of /proc/swaps.  This will always show the whole\nlast line of /proc/swaps\"\n\nDescribed problem is still actual.  If you make lseek into middle of\nlast output line following read will output end of last line and whole\nlast line once again.\n\n  $ dd if\u003d/proc/swaps bs\u003d1  # usual output\n  Filename\t\t\t\tType\t\tSize\tUsed\tPriority\n  /dev/dm-0                             partition\t4194812\t97536\t-2\n  104+0 records in\n  104+0 records out\n  104 bytes copied\n\n  $ dd if\u003d/proc/swaps bs\u003d40 skip\u003d1    # last line was generated twice\n  dd: /proc/swaps: cannot skip to specified offset\n  v/dm-0                                partition\t4194812\t97536\t-2\n  /dev/dm-0                             partition\t4194812\t97536\t-2\n  3+1 records in\n  3+1 records out\n  131 bytes copied\n\nThere are lot of other affected files, I\u0027ve found 30+ including\n/proc/net/ip_tables_matches and /proc/sysvipc/*\n\nI\u0027ve sent patches into maillists of affected subsystems already, this\npatch-set fixes the problem in files related to pstore, tracing, gcov,\nsysvipc and other subsystems processed via linux-kernel@ mailing list\ndirectly\n\nhttps://bugzilla.kernel.org/show_bug.cgi?id\u003d206283\n\nThis patch (of 4):\n\nAdd debug code to seq_read() to detect missed or out-of-tree incorrect\n.next seq_file functions.\n\n[akpm@linux-foundation.org: s/pr_info/pr_info_ratelimited/, per Qian Cai]\nhttps://bugzilla.kernel.org/show_bug.cgi?id\u003d206283\nSigned-off-by: Vasily Averin \u003cvvs@virtuozzo.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: NeilBrown \u003cneilb@suse.com\u003e\nCc: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Davidlohr Bueso \u003cdave@stgolabs.net\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Manfred Spraul \u003cmanfred@colorfullife.com\u003e\nCc: Peter Oberparleiter \u003coberpar@linux.ibm.com\u003e\nCc: Waiman Long \u003clongman@redhat.com\u003e\nLink: http://lkml.kernel.org/r/244674e5-760c-86bd-d08a-047042881748@virtuozzo.com\nLink: http://lkml.kernel.org/r/7c24087c-e280-e580-5b0c-0cdaeb14cd18@virtuozzo.com\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "79781ebd2145e48d6a8735e1f44744054e03029b",
      "old_mode": 33188,
      "old_path": "fs/seq_file.c",
      "new_id": "70f5fdf99bf690a654ff18ef194a45cc848a7d0d",
      "new_mode": 33188,
      "new_path": "fs/seq_file.c"
    }
  ]
}
