linux/fs/netfs
David Howells 8d4d00ea60 netfs: Fix ref leak on inserted extra subreq in write retry
[ Upstream commit 97d8e8e52c ]

The write-retry algorithm will insert extra subrequests into the list if it
can't get sufficient capacity to split the range that needs to be retried
into the sequence of subrequests it currently has (for instance, if the
cifs credit pool has fewer credits available than it did when the range was
originally divided).

However, the allocator furnishes each new subreq with 2 refs and then
another is added for resubmission, causing one to be leaked.

Fix this by replacing the ref-getting line with a neutral trace line.

Fixes: 288ace2f57 ("netfs: New writeback implementation")
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/20250701163852.2171681-6-dhowells@redhat.com
Tested-by: Steve French <sfrench@samba.org>
Reviewed-by: Paulo Alcantara <pc@manguebit.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-07-17 18:37:16 +02:00
..
buffered_read.c netfs: Fix enomem handling in buffered reads 2025-01-17 13:40:34 +01:00
buffered_write.c netfs: Fix i_size updating 2025-07-10 16:04:52 +02:00
direct_read.c netfs: Fix netfs_unbuffered_read() to return ssize_t rather than int 2025-04-10 14:39:31 +02:00
direct_write.c netfs: Fix i_size updating 2025-07-10 16:04:52 +02:00
fscache_cache.c netfs: Revert "netfs: Switch debug logging to pr_debug()" 2024-07-24 10:15:37 +02:00
fscache_cookie.c fs/netfs/fscache_cookie: add missing "n_accesses" check 2024-08-12 22:03:26 +02:00
fscache_internal.h netfs, fscache: Combine fscache with netfs 2023-12-24 15:08:46 +00:00
fscache_io.c netfs: Revert "netfs: Switch debug logging to pr_debug()" 2024-07-24 10:15:37 +02:00
fscache_main.c fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF 2024-09-01 10:30:25 +02:00
fscache_proc.c netfs: Fix proc/fs/fscache symlink to point to "netfs" not "../netfs" 2024-01-04 13:15:32 +00:00
fscache_stats.c netfs: Fix interaction between write-streaming and cachefiles culling 2024-01-05 15:42:25 +00:00
fscache_volume.c netfs/fscache: Add a memory barrier for FSCACHE_VOLUME_CREATING 2024-12-05 14:01:14 +01:00
internal.h netfs: Fix write oops in generic/346 (9p) and generic/074 (cifs) 2024-09-26 17:45:20 -05:00
iterator.c netfs: Speed up buffered reading 2024-09-12 12:20:41 +02:00
Kconfig netfs: clean up after renaming FSCACHE_DEBUG config 2024-08-12 22:03:26 +02:00
locking.c netfs: Downgrade i_rwsem for a buffered write 2024-10-17 15:33:42 +02:00
main.c netfs: Only create /proc/fs/netfs with CONFIG_PROC_FS 2025-05-02 07:59:26 +02:00
Makefile netfs: Speed up buffered reading 2024-09-12 12:20:41 +02:00
misc.c netfs: Fix a KMSAN uninit-value error in netfs_clear_buffer 2024-10-01 16:02:42 +02:00
objects.c netfs: Speed up buffered reading 2024-09-12 12:20:41 +02:00
read_collect.c fs/netfs/read_collect: add to next->prev_donated 2025-03-22 12:54:28 -07:00
read_pgpriv2.c fs/netfs/read_pgpriv2: skip folio queues without marks3 2025-03-13 13:02:18 +01:00
read_retry.c netfs: Fix read-retry for fs with no ->prepare_read() 2025-01-17 13:40:45 +01:00
stats.c netfs: Speed up buffered reading 2024-09-12 12:20:41 +02:00
write_collect.c netfs: Fix ref leak on inserted extra subreq in write retry 2025-07-17 18:37:16 +02:00
write_issue.c netfs: Fix missing wakeup after issuing writes 2024-10-02 16:56:15 +02:00