Skip to content

Commit 4356ab3

Browse files
committed
Merge tag 'vfs-6.11-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner: "Two netfs fixes for this merge window: - Ensure that fscache_cookie_lru_time is deleted when the fscache module is removed to prevent UAF - Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range() Before it used truncate_inode_pages_partial() which causes copy_file_range() to fail on cifs" * tag 'vfs-6.11-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF mm: Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range()
2 parents c7fb169 + 72a6e22 commit 4356ab3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

fs/netfs/fscache_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ void __exit fscache_exit(void)
103103

104104
kmem_cache_destroy(fscache_cookie_jar);
105105
fscache_proc_cleanup();
106+
timer_shutdown_sync(&fscache_cookie_lru_timer);
106107
destroy_workqueue(fscache_wq);
107108
pr_notice("FS-Cache unloaded\n");
108109
}

mm/filemap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4231,7 +4231,7 @@ int filemap_invalidate_inode(struct inode *inode, bool flush,
42314231
}
42324232

42334233
/* Wait for writeback to complete on all folios and discard. */
4234-
truncate_inode_pages_range(mapping, start, end);
4234+
invalidate_inode_pages2_range(mapping, start / PAGE_SIZE, end / PAGE_SIZE);
42354235

42364236
unlock:
42374237
filemap_invalidate_unlock(mapping);

0 commit comments

Comments
 (0)