{"id":2228121,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2228121/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/cover/20260425125426.3855807-1-dhowells@redhat.com/","project":{"id":12,"url":"http://patchwork.ozlabs.org/api/1.1/projects/12/?format=json","name":"Linux CIFS Client","link_name":"linux-cifs-client","list_id":"linux-cifs.vger.kernel.org","list_email":"linux-cifs@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260425125426.3855807-1-dhowells@redhat.com>","date":"2026-04-25T12:54:04","name":"[v3,00/19] netfs: Miscellaneous fixes","submitter":{"id":59,"url":"http://patchwork.ozlabs.org/api/1.1/people/59/?format=json","name":"David Howells","email":"dhowells@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/linux-cifs-client/cover/20260425125426.3855807-1-dhowells@redhat.com/mbox/","series":[{"id":501437,"url":"http://patchwork.ozlabs.org/api/1.1/series/501437/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=501437","date":"2026-04-25T12:54:04","name":"netfs: Miscellaneous fixes","version":3,"mbox":"http://patchwork.ozlabs.org/series/501437/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2228121/comments/","headers":{"Return-Path":"\n <linux-cifs+bounces-11109-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-cifs@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=DDCHbm+P;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-cifs+bounces-11109-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=\"DDCHbm+P\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=170.10.133.124","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=redhat.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g2qY12gQMz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 22:54:45 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 0FD86301629B\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 12:54:42 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 205F237418F;\n\tSat, 25 Apr 2026 12:54:41 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 84D0535BDD5\n\tfor <linux-cifs@vger.kernel.org>; Sat, 25 Apr 2026 12:54:39 +0000 (UTC)","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-74-jZgm73z_OD-3sDHpzV6hkQ-1; Sat,\n 25 Apr 2026 08:54:35 -0400","from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 7F40E195608B;\n\tSat, 25 Apr 2026 12:54:33 +0000 (UTC)","from warthog.procyon.org.com (unknown [10.44.48.17])\n\tby mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 6307819560AB;\n\tSat, 25 Apr 2026 12:54:29 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777121681; cv=none;\n b=L4bjfsy2kO0T5UcqwgB4zZU8WnrbTHZYXHrpH91EkNgAswEkjLm3eQOi73O2ZLOyODwn5AIp7jjOUMMy15sMuJAq7CpBt8mPrPNqkERJWSYFRWuu1K/gA6/b5iFUOWRAY624rorQBaUCtoMhoBF0Lyikaoj/jJvOM+W657CxrXY=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777121681; c=relaxed/simple;\n\tbh=RRQ0IXdttCveiiHSEJbAsHURjxw1HDI3FgodXfjDv7Y=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=AAfOoEwJOpoK07PjleLBGVnXr9uS6tlM/D/UJDaZzXVA+yg34EaLC6hP5RWbdMLpbTRSt2+8HMU9846d3cML7zFtc6VC1yi/LCJRfFbmwa63o13SuuxtcS3FVb5YozYM0Ea7RM9iRoZ7z14eg7pkvaLUTBeXFrpDkJCdlmtkEbw=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com;\n spf=pass smtp.mailfrom=redhat.com;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=DDCHbm+P; arc=none smtp.client-ip=170.10.133.124","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1777121678;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding;\n\tbh=pVwB7OIP/Kn8ajofvoCHRiXa+pRDIyAY5VS4PTcDuJ8=;\n\tb=DDCHbm+P+so2YAJn4nYgwVrieIQyQ0tSOvRTCsLgOmV7OokW1pJ/FOTE0g1Ota6GIN+JQd\n\t/hyHPqCjdgUFF3iEaR6ZSGCtxI+YXmv6lDGm4zMGWR22ZgcBNDNJXeVM+AZ5K38LBD6rUH\n\t7Kpc6fO7x94//LD7gsBCxKOqbVWV8OM=","X-MC-Unique":"jZgm73z_OD-3sDHpzV6hkQ-1","X-Mimecast-MFC-AGG-ID":"jZgm73z_OD-3sDHpzV6hkQ_1777121674","From":"David Howells <dhowells@redhat.com>","To":"Christian Brauner <christian@brauner.io>","Cc":"David Howells <dhowells@redhat.com>,\n\tPaulo Alcantara <pc@manguebit.org>,\n\tnetfs@lists.linux.dev,\n\tlinux-afs@lists.infradead.org,\n\tlinux-cifs@vger.kernel.org,\n\tceph-devel@vger.kernel.org,\n\tlinux-fsdevel@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org","Subject":"[PATCH v3 00/19] netfs: Miscellaneous fixes","Date":"Sat, 25 Apr 2026 13:54:04 +0100","Message-ID":"<20260425125426.3855807-1-dhowells@redhat.com>","Precedence":"bulk","X-Mailing-List":"linux-cifs@vger.kernel.org","List-Id":"<linux-cifs.vger.kernel.org>","List-Subscribe":"<mailto:linux-cifs+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-cifs+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.12"},"content":"Hi Christian,\n\nHere are the outstanding miscellaneous fixes for netfslib gathered together\nand with some fixes-to-fixes folded down and one rearrangement.  Various\nSashiko review comments[1][2] are addressed:\n\n (1) Fix triggering of a VM_BUG_ON_FOLIO() in netfs_write_begin().\n\n (2) Fix error handling in netfs_extract_user_iter().\n\n (3) Fix netfs_invalidate_folio() to clear the folio dirty bit if all dirty\n     data removed.\n\n (4) Defer the emission of trace_netfs_folio() in netfs_perform_write().\n     This allows the next patch to emit the correct traces.\n\n (5) Fix the handling of a partially failed copy (ie. EFAULT) into a\n     streaming write folio.  Also remove the netfs_folio if a streaming\n     write folio is entirely overwritten.\n\n (6) Fix netfs_read_gaps() to remove the netfs_folio from a filled folio.\n\n (7) Fix the calculation of zero_point in netfs_release_folio() to limit it\n     to ->remote_i_size, not ->i_size.\n\n (8) Fix netfs_perform_write() to not disable streaming writes when writing\n     to an fd that's open O_RDWR.\n\n (9) Fix an early put of the sink page used in netfs_read_gaps(), before\n     the request has completed.\n\n(10) Fix request leak in netfs_write_begin() error handling.\n\n(11) Fix a potential UAF in netfs_unlock_abandoned_read_pages() due to\n     trying to check index of each folio we're abandoning to see if that\n     folio is actually owned by the caller (in which case, we're not\n     actually allowed to dereference it).\n\n(12) Fix a potentially uninitialised error value in\n     netfs_extract_user_iter().\n\n(13) Fix incorrect adjustment of dirty region when partially invalidating a\n     streaming write folio.\n\n(14) Fix the handling of folio->private in netfs_perform_write() and the\n     attached netfs_folio and/or group when a streaming write folio is\n     modified.\n\n(15) Fix the potential for 64-bit tearing on a 32-bit machine when reading\n     netfs_inode->remote_i_size and ->zero_point by using much the same\n     mechanism as is used for ->i_size.\n\n(16) Fix netfs_read_folio() to wait on writeback first (it holds the folio\n     lock) otherwise we aren't allowed to look at the netfs_folio struct as\n     that could be modified at any time by the writeback collector.\n\n(17) Fix read and write result collection to use barriering correctly to\n     access a request's subrequest lists without taking a lock.\n\n     This adds list_add_tail_release() and list_first_entry_acquire() to\n     appropriate incorporate barriering into some list functions.\n\n(18) Fix afs_get_link() to take the vnode->validate_lock around\n     afs_read_single() to prevent a race with another caller of\n     afs_get_link() also trying to read the symlink content.\n\n(19) Fix the RCU handling of symlinks in RCU pathwalk.  The problems were\n     that afs_get_link() didn't use proper RCU pointer dereferencing and\n     that AFS symlinks can be updated remotely, potentially causing the\n     buffer memory to be changed.\n\nThese are applied on top of your vfs.fixes branch.\n\nThe patches can also be found here:\n\n\thttps://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes\n\nThanks,\nDavid\n\n[1] https://sashiko.dev/#/patchset/20260414082004.3756080-1-dhowells%40redhat.com\n[2] https://sashiko.dev/#/patchset/20260326104544.509518-1-dhowells%40redhat.com\n\nChanges\n=======\nver #3)\n- Rebase on linus/master.\n- Consolidate the various sets of fixes for reposting.\n- Fold down fixes-to-fixes.\n- Move the tracing change in netfs_perform_write() down to below the patch\n  it primarily affects.\n\nbase-commit: 27d128c1cff64c3b8012cc56dd5a1391bb4f1821\n\nDavid Howells (17):\n  netfs: Fix netfs_invalidate_folio() to clear dirty bit if all changes\n    gone\n  netfs: Defer the emission of trace_netfs_folio()\n  netfs: Fix streaming write being overwritten\n  netfs: Fix read-gaps to remove netfs_folio from filled folio\n  netfs: Fix zeropoint update where i_size > remote_i_size\n  netfs: Fix write streaming disablement if fd open O_RDWR\n  netfs: Fix early put of sink folio in netfs_read_gaps()\n  netfs: Fix leak of request in netfs_write_begin() error handling\n  netfs: Fix potential UAF in netfs_unlock_abandoned_read_pages()\n  netfs: Fix potential uninitialised var in netfs_extract_user_iter()\n  netfs: Fix partial invalidation of streaming-write folio\n  netfs: Fix folio->private handling in netfs_perform_write()\n  netfs: Fix potential for tearing in ->remote_i_size and ->zero_point\n  netfs: Fix netfs_read_folio() to wait on writeback\n  netfs: Fix missing barriers when accessing stream->subrequests\n    locklessly\n  afs: Fix afs_get_link() to take validate_lock around afs_read_single()\n  afs: Fix RCU handling of symlinks in RCU pathwalk\n\nPaulo Alcantara (1):\n  netfs: fix error handling in netfs_extract_user_iter()\n\nViacheslav Dubeyko (1):\n  netfs: fix VM_BUG_ON_FOLIO() issue in netfs_write_begin() call\n\n fs/9p/vfs_inode.c            |   2 +-\n fs/9p/vfs_inode_dotl.c       |   4 +-\n fs/afs/Makefile              |   1 +\n fs/afs/dir.c                 |  33 +++-\n fs/afs/fsclient.c            |   4 +-\n fs/afs/inode.c               | 104 +-----------\n fs/afs/internal.h            |  35 +++-\n fs/afs/symlink.c             | 242 ++++++++++++++++++++++++++++\n fs/afs/write.c               |   2 +-\n fs/afs/yfsclient.c           |   4 +-\n fs/netfs/buffered_read.c     |  39 +++--\n fs/netfs/buffered_write.c    | 111 ++++++++-----\n fs/netfs/direct_read.c       |  15 +-\n fs/netfs/direct_write.c      |   4 +-\n fs/netfs/internal.h          |   3 +\n fs/netfs/iterator.c          |  15 +-\n fs/netfs/misc.c              |  21 ++-\n fs/netfs/read_collect.c      |   6 +-\n fs/netfs/read_retry.c        |  11 +-\n fs/netfs/read_single.c       |  12 +-\n fs/netfs/write_collect.c     |   7 +-\n fs/netfs/write_issue.c       |   3 +-\n fs/smb/client/cifsfs.c       |  24 +--\n fs/smb/client/cifssmb.c      |   2 +-\n fs/smb/client/file.c         |   9 +-\n fs/smb/client/inode.c        |   9 +-\n fs/smb/client/readdir.c      |   3 +-\n fs/smb/client/smb2ops.c      |  16 +-\n fs/smb/client/smb2pdu.c      |   2 +-\n include/linux/list.h         |  37 +++++\n include/linux/netfs.h        | 298 +++++++++++++++++++++++++++++++++--\n include/trace/events/netfs.h |   8 +\n 32 files changed, 826 insertions(+), 260 deletions(-)\n create mode 100644 fs/afs/symlink.c"}