2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/fs/ext4
Davidlohr Bueso 2d900efff9
mm/migrate: fix sleep in atomic for large folios and buffer heads
The large folio + buffer head noref migration scenarios are
being naughty and blocking while holding a spinlock.

As a consequence of the pagecache lookup path taking the
folio lock this serializes against migration paths, so
they can wait for each other. For the private_lock
atomic case, a new BH_Migrate flag is introduced which
enables the lookup to bail.

This allows the critical region of the private_lock on
the migration path to be reduced to the way it was before
ebdf4de564 ("mm: migrate: fix reference  check race
between __find_get_block() and migration"), that is covering
the count checks.

The scope is always noref migration.

Reported-by: kernel test robot <oliver.sang@intel.com>
Reported-by: syzbot+f3c6fda1297c748a7076@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/oe-lkp/202503101536.27099c77-lkp@intel.com
Fixes: 3c20917120 ("block/bdev: enable large folio support for large logical block sizes")
Reviewed-by: Jan Kara <jack@suse.cz>
Co-developed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://kdevops.org/ext4/v6.15-rc2.html # [0]
Link: https://lore.kernel.org/all/aAAEvcrmREWa1SKF@bombadil.infradead.org/ # [1]
Link: https://lore.kernel.org/20250418015921.132400-8-dave@stgolabs.net
Tested-by: kdevops@lists.linux.dev # [0] [1]
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-04-22 18:16:08 +02:00
..
.kunitconfig ext4: add .kunitconfig fragment to enable ext4-specific tests 2021-02-11 23:16:30 -05:00
acl.c ext4: convert to ctime accessor functions 2023-07-24 10:29:54 +02:00
acl.h Revert "ext4: apply umask if ACL support is disabled" 2024-05-02 18:25:39 -04:00
balloc.c ext4: reorder capability check last 2025-03-18 00:15:25 -04:00
bitmap.c ext4: remove redundant function ext4_has_metadata_csum 2025-03-17 11:19:41 -04:00
block_validity.c ext4: make block validity check resistent to sb bh corruption 2025-04-12 22:01:37 -04:00
crypto.c ext4: Move CONFIG_UNICODE defguards into the code flow 2024-06-07 17:00:45 +02:00
dir.c ext4: fix OOB read when checking dotdot dir 2025-03-21 01:33:11 -04:00
ext4_extents.h ext4: fix sparse warnings 2021-08-30 23:36:50 -04:00
ext4_jbd2.c ext4: remove redundant function ext4_has_metadata_csum 2025-03-17 11:19:41 -04:00
ext4_jbd2.h ext4: avoid journaling sb update on error if journal is destroying 2025-03-21 01:12:33 -04:00
ext4.h ext4: Make sb update interval tunable 2025-03-21 01:12:33 -04:00
extents_status.c ext4: Remove a redundant return statement 2025-03-13 09:57:19 -04:00
extents_status.h ext4: don't pass full mapping flags to ext4_es_insert_extent() 2024-11-12 23:54:14 -05:00
extents.c ext4: correct the error handle in ext4_fallocate() 2025-03-21 01:33:11 -04:00
fast_commit.c ext4 fast_commit: make use of name_snapshot primitives 2025-01-27 19:24:43 -05:00
fast_commit.h ext4 fast_commit: make use of name_snapshot primitives 2025-01-27 19:24:43 -05:00
file.c Ext4 bug fixes and cleanups, including: 2025-03-27 13:27:08 -07:00
fsmap.c ext4: fix FS_IOC_GETFSMAP handling 2024-11-12 23:52:47 -05:00
fsmap.h ext4: fsmap: fix the block/inode bitmap comment 2021-06-24 09:48:29 -04:00
fsync.c ext4: add ext4_emergency_state() helper function 2025-03-13 10:16:34 -04:00
hash.c ext4: hash: simplify kzalloc(n * 1, ...) to kzalloc(n, ...) 2025-03-21 01:10:10 -04:00
ialloc.c mm/migrate: fix sleep in atomic for large folios and buffer heads 2025-04-22 18:16:08 +02:00
indirect.c ext4: fix race in buffer_head read fault injection 2024-11-12 23:54:14 -05:00
inline.c - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
inode-test.c ext4: add missing MODULE_DESCRIPTION() 2024-07-05 16:07:24 -04:00
inode.c A few more miscellaneous ext4 bug fixes and cleanups including some 2025-04-13 07:15:50 -07:00
ioctl.c ext4: remove redundant function ext4_has_metadata_csum 2025-03-17 11:19:41 -04:00
Kconfig ext4: switch to using the crc32c library 2024-12-01 17:23:02 -08:00
Makefile ext4: move ext4 crypto code to its own file crypto.c 2022-05-21 22:24:24 -04:00
mballoc-test.c ext4: fix potential null dereference in ext4 kunit test 2025-03-13 10:01:14 -04:00
mballoc.c fs/ext4: use sleeping version of sb_find_get_block() 2025-04-22 18:16:08 +02:00
mballoc.h ext4: fix FS_IOC_GETFSMAP handling 2024-11-12 23:52:47 -05:00
migrate.c ext4: fix i_data_sem unlock order in ext4_ind_migrate() 2024-09-03 22:14:17 -04:00
mmp.c ext4: remove redundant function ext4_has_metadata_csum 2025-03-17 11:19:41 -04:00
move_extent.c fs: convert block_commit_write() to take a folio 2025-03-16 22:06:22 -07:00
namei.c A few more miscellaneous ext4 bug fixes and cleanups including some 2025-04-13 07:15:50 -07:00
orphan.c ext4: remove redundant function ext4_has_metadata_csum 2025-03-17 11:19:41 -04:00
page-io.c Ext4 bug fixes and cleanups, including: 2025-03-27 13:27:08 -07:00
readpage.c ext4: reduce stack usage in ext4_mpage_readpages() 2024-08-26 21:47:03 -04:00
resize.c ext4: remove redundant function ext4_has_metadata_csum 2025-03-17 11:19:41 -04:00
super.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
symlink.c ext4_get_link(): fix breakage in RCU mode 2024-02-25 02:10:32 -05:00
sysfs.c ext4: Make sb update interval tunable 2025-03-21 01:12:33 -04:00
truncate.h ext4: Convert to use mapping->invalidate_lock 2021-07-13 14:29:00 +02:00
verity.c fs: Convert aops->write_begin to take a folio 2024-08-07 11:33:21 +02:00
xattr_hurd.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_security.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_trusted.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_user.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr.c ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all() 2025-03-18 00:15:19 -04:00
xattr.h ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all() 2025-03-18 00:15:19 -04:00