)]}'
{
  "commit": "b5ab84eb461e28f2bb8005e57cf9496ad6e8467a",
  "tree": "229b3e1f7a425b04b88fda3c0b37c06d8d3ed86b",
  "parents": [
    "c14623cd1bd399f3b8f1c73616ec91ba4ec6d710"
  ],
  "author": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Mon Apr 27 14:03:59 2026 +0100"
  },
  "committer": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Tue May 12 10:07:55 2026 +0100"
  },
  "message": "afs: Fix the locking used by afs_get_link()\n\nThe afs filesystem in the kernel doesn\u0027t do locking correctly for symbolic\nlinks.  There are a number of problems:\n\n (1) It doesn\u0027t do any locking around afs_read_single() to prevent races\n     between multiple -\u003eget_link() calls, thereby allowing the possibility\n     of leaks.\n\n (2) It doesn\u0027t use RCU barriering when accessing the buffer pointers\n     during RCU pathwalk.\n\n (3) It can race with another thread updating the contents of the symlink\n     if a third party updated it on the server.\n\nFix this by the following means:\n\n (0) Move symlink handling into its own file as this makes it more\n     complicated.\n\n (1) Take the validate_lock around afs_read_single() to prevent races\n     between multiple -\u003eget_link() calls.\n\n (2) Keep a separate copy of the symlink contents with an rcu_head.  This\n     is always going to be a lot smaller than a page, so it can be\n     kmalloc\u0027d and save quite a bit of memory.  It also needs a refcount\n     for non-RCU pathwalk.\n\n (3) Split the symlink read and write-to-cache routines in afs from those\n     for directories.\n\n (4) Discard the I/O buffer as soon as the write-to-cache completes as this\n     is a full page (plus a folio_queue).\n\n (5) If there\u0027s no cache, discard the I/O buffer immediately after reading\n     and copying if there is no cache.\n\nFixes: eae9e78951bb (\"afs: Use netfslib for symlinks, allowing them to be cached\")\nFixes: 6698c02d64b2 (\"afs: Locally initialise the contents of a new symlink on creation\")\nCloses: https://sashiko.dev/#/patchset/20260326104544.509518-1-dhowells%40redhat.com\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\ncc: Marc Dionne \u003cmarc.dionne@auristor.com\u003e\ncc: linux-afs@lists.infradead.org\ncc: linux-fsdevel@vger.kernel.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b49b8fe682f3993222dd89bdb93e1158cbaa520f",
      "old_mode": 33188,
      "old_path": "fs/afs/Makefile",
      "new_id": "0d8f1982d596c481282b6536ce37ef340d576adb",
      "new_mode": 33188,
      "new_path": "fs/afs/Makefile"
    },
    {
      "type": "modify",
      "old_id": "d1542a1a50bfad7d6b246737190784fdaccddc08",
      "old_mode": 33188,
      "old_path": "fs/afs/dir.c",
      "new_id": "498b99ccdf0e2786999cd5f8e902a086312cf689",
      "new_mode": 33188,
      "new_path": "fs/afs/dir.c"
    },
    {
      "type": "modify",
      "old_id": "95494d5f2b8a9791c858fb7e85609534623a8bb6",
      "old_mode": 33188,
      "old_path": "fs/afs/fsclient.c",
      "new_id": "a2ffd60889f89d853cfa23018c9ed39b09d9f662",
      "new_mode": 33188,
      "new_path": "fs/afs/fsclient.c"
    },
    {
      "type": "modify",
      "old_id": "19fe2e392885bdec3949ad82704e2724a274abe1",
      "old_mode": 33188,
      "old_path": "fs/afs/inode.c",
      "new_id": "3f48458694baa511a20c760ee3a858b3ee4dffcb",
      "new_mode": 33188,
      "new_path": "fs/afs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "816dc848ea713aff610f6cf32686ec56c6094ed0",
      "old_mode": 33188,
      "old_path": "fs/afs/internal.h",
      "new_id": "0b72a8566299928913afa2cca6c55b32bc0fed2f",
      "new_mode": 33188,
      "new_path": "fs/afs/internal.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ed5868369f372d3ce03de481a4d384652befd8e4",
      "new_mode": 33188,
      "new_path": "fs/afs/symlink.c"
    },
    {
      "type": "modify",
      "old_id": "0ba8336c9025080e16b01972e3338316b09c2141",
      "old_mode": 33188,
      "old_path": "fs/afs/validation.c",
      "new_id": "e997563af658bb6488e2d297fea5e9a42cfb9006",
      "new_mode": 33188,
      "new_path": "fs/afs/validation.c"
    },
    {
      "type": "modify",
      "old_id": "24fb562ebd33ace4aa13c3e77e1b7df8c521c579",
      "old_mode": 33188,
      "old_path": "fs/afs/yfsclient.c",
      "new_id": "d941179730a9893bbc93237b18432131dcca10b9",
      "new_mode": 33188,
      "new_path": "fs/afs/yfsclient.c"
    }
  ]
}
