The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/9] netfs, cachefiles: Miscellaneous fixes
@ 2026-08-25 13:20 David Howells
  2026-08-25 13:20 ` [PATCH v2 1/9] netfs: Fix uninitialized return value in netfs_unbuffered_write() David Howells
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: David Howells @ 2026-08-25 13:20 UTC (permalink / raw)
  To: Christian Brauner
  Cc: David Howells, Paulo Alcantara, netfs, linux-afs, linux-cifs,
	ceph-devel, linux-fsdevel, linux-kernel

Hi Christian,

Here are some miscellaneous fixes for netfslib and one for cachefiles, if
you could pick them up?

The first six are all in unbuffered/DIO write:

 (1) Fix an uninitialised return value from netfs_unbuffered_write().

 (2) Fix the normal error return, preferring partial transfer size over
     request error over immediate error (e.g. EINTR).

 (3) Fix the async error return, preferring partial transfer size over
     error.

 (4) Fix the update of i_size on partial transfer ending in an error.

 (5) Fix a subrequest leak in an error path.

 (6) Fix the code to handle subrequest allocation failure.

Then there's:

 (7) Fix synchronisation issues with using a progressive rolling buffer for
     readahead by fetching everything into it upfront so that the issues
     don't arise.  Dropping the refs so acquired is deferred until after
     I/O is begun.

 (8) Fix read progress reporting to avoid 64-bit tearing on a 32-bit
     machine.  This has been modified from the previous submission as part
     of a different series to take account of a sashiko reported issue[1].

 (9) Fix a potential UAF/KASAN warning reported by sashiko[1] in cachefiles
     in which the coherency data buffer is cast to a __be64* and
     dereferenced in a tracepoint - even though it might not be at least
     that large (or aligned).

The patches can also be found here:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes

Thanks,
David

Changes
=======
ver #2)
- Imported a patch to add subreq alloc failure handling in unbuffered/DIO
  write.
- Fixed a number of issues reported by Sashiko[2]:
  - Added four patches to fix bugs in unbuffered/DIO write.
  - Added a patch to fix readahead rolling buffer issues.
  - Fixed the cachefiles xattr stuff to use max() not min() when
    allocating.
  - Fixed the cachefiles trace comment with regard to alignment.
  - Fixed netfs_read_set_unlock_at() to use folioq_count(), not
    folio_nr_slots().

[1] https://sashiko.dev/#/patchset/20260810144746.574036-1-dhowells%40redhat.com
[2] https://sashiko.dev/#/patchset/20260824120224.504575-1-dhowells%40redhat.com

David Howells (7):
  netfs: Fix unbuffered/DIO write partial transfer error return
  netfs: Fix error vs transferred passed to ->ki_complete()
  netfs: Fix i_size update for partial transfer
  netfs: Fix subreq ref leak
  netfs: Fix readahead synchronisation issues by loading all folios
    upfront
  netfs: Fix read progress reporting
  cachefiles: Fix potential UAF/KASAN warning

Edward Adam Davis (1):
  netfs: break unbuffered write when netfs_alloc_subrequest() fails

Karl Mehltretter (1):
  netfs: Fix uninitialized return value in netfs_unbuffered_write()

 fs/cachefiles/xattr.c             |  16 ++---
 fs/netfs/buffered_read.c          | 103 ++++++++++++++++++------------
 fs/netfs/direct_write.c           |  30 +++++----
 fs/netfs/internal.h               |   2 +
 fs/netfs/misc.c                   |  19 ++++++
 fs/netfs/objects.c                |  32 ++++++----
 fs/netfs/read_collect.c           |  65 +++++++++++++++----
 fs/netfs/read_retry.c             |   7 ++
 fs/netfs/read_single.c            |   2 +
 fs/netfs/rolling_buffer.c         |  81 ++++++++++++++---------
 fs/netfs/write_issue.c            |   2 +
 include/linux/netfs.h             |   3 +-
 include/linux/rolling_buffer.h    |   6 +-
 include/trace/events/cachefiles.h |  19 +++++-
 include/trace/events/netfs.h      |  24 +++++++
 15 files changed, 291 insertions(+), 120 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-08-25 13:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 13:20 [PATCH v2 0/9] netfs, cachefiles: Miscellaneous fixes David Howells
2026-08-25 13:20 ` [PATCH v2 1/9] netfs: Fix uninitialized return value in netfs_unbuffered_write() David Howells
2026-08-25 13:20 ` [PATCH v2 2/9] netfs: Fix unbuffered/DIO write partial transfer error return David Howells
2026-08-25 13:20 ` [PATCH v2 3/9] netfs: Fix error vs transferred passed to ->ki_complete() David Howells
2026-08-25 13:20 ` [PATCH v2 4/9] netfs: Fix i_size update for partial transfer David Howells
2026-08-25 13:20 ` [PATCH v2 5/9] netfs: Fix subreq ref leak David Howells
2026-08-25 13:20 ` [PATCH v2 6/9] netfs: break unbuffered write when netfs_alloc_subrequest() fails David Howells
2026-08-25 13:20 ` [PATCH v2 7/9] netfs: Fix readahead synchronisation issues by loading all folios upfront David Howells
2026-08-25 13:20 ` [PATCH v2 8/9] netfs: Fix read progress reporting David Howells
2026-08-25 13:20 ` [PATCH v2 9/9] cachefiles: Fix potential UAF/KASAN warning David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox