[linux-next][20241004]BUG: KFENCE: memory corruption in xfs_iext_remove+0x288/0x2c8 [xfs]

From: Venkat Rao Bagalkote
Date: Mon Oct 07 2024 - 10:05:17 EST


Greetings!!!


Observing Kfence errors, while running fsstress test on Power PC platform


[ 6726.655519] ==================================================================
[ 6726.655540] BUG: KFENCE: memory corruption in xfs_iext_remove+0x288/0x2c8 [xfs]
[ 6726.655540]
[ 6726.655746] Corrupted memory at 0x00000000b8747239 [ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ] (in kfence-#97):
[ 6726.655789]  xfs_iext_remove+0x288/0x2c8 [xfs]
[ 6726.655970]  xfs_bmap_del_extent_real+0x34c/0x8ec [xfs]
[ 6726.656159]  __xfs_bunmapi+0x538/0xb28 [xfs]
[ 6726.656352]  xfs_bunmapi_range+0xbc/0x138 [xfs]
[ 6726.656548]  xfs_itruncate_extents_flags+0x1bc/0x2f0 [xfs]
[ 6726.656748]  xfs_inactive_truncate+0xec/0x134 [xfs]
[ 6726.656890]  xfs_inactive+0x2fc/0x41c [xfs]
[ 6726.657019]  xfs_inodegc_worker+0x134/0x240 [xfs]
[ 6726.657129]  process_one_work+0x1fc/0x4dc
[ 6726.657136]  worker_thread+0x340/0x504
[ 6726.657142]  kthread+0x138/0x140
[ 6726.657147]  start_kernel_thread+0x14/0x18
[ 6726.657152]
[ 6726.657155] kfence-#97: 0x000000001b23b51e-0x0000000088873dcf, size=208, cache=kmalloc-256
[ 6726.657155]
[ 6726.657162] allocated by task 187091 on cpu 4 at 6323.430277s (403.226884s ago):
[ 6726.657170]  krealloc_noprof+0x18c/0x38c
[ 6726.657176]  xfs_iext_insert_raw+0x3c8/0x434 [xfs]
[ 6726.657265]  xfs_iext_insert+0x58/0xec [xfs]
[ 6726.657354] xfs_bmap_add_extent_hole_delay.constprop.0+0x130/0x4c8 [xfs]
[ 6726.657439]  xfs_bmapi_reserve_delalloc+0x234/0x4c8 [xfs]
[ 6726.657525]  xfs_buffered_write_iomap_begin+0x490/0x9e4 [xfs]
[ 6726.657619]  iomap_iter+0xf0/0x188
[ 6726.657624]  iomap_file_buffered_write+0xbc/0x11c
[ 6726.657629]  xfs_file_buffered_write+0xbc/0x388 [xfs]
[ 6726.657722]  vfs_write+0x38c/0x488
[ 6726.657727]  ksys_write+0x84/0x140
[ 6726.657732]  system_call_exception+0x138/0x330
[ 6726.657738]  system_call_vectored_common+0x15c/0x2ec
[ 6726.657745]
[ 6726.657747] freed by task 192236 on cpu 0 at 6726.655507s (0.002239s ago):
[ 6726.657755]  xfs_iext_remove+0x288/0x2c8 [xfs]
[ 6726.657844]  xfs_bmap_del_extent_real+0x34c/0x8ec [xfs]
[ 6726.657929]  __xfs_bunmapi+0x538/0xb28 [xfs]
[ 6726.658013]  xfs_bunmapi_range+0xbc/0x138 [xfs]
[ 6726.658097]  xfs_itruncate_extents_flags+0x1bc/0x2f0 [xfs]
[ 6726.658187]  xfs_inactive_truncate+0xec/0x134 [xfs]
[ 6726.658278]  xfs_inactive+0x2fc/0x41c [xfs]
[ 6726.658368]  xfs_inodegc_worker+0x134/0x240 [xfs]
[ 6726.658458]  process_one_work+0x1fc/0x4dc
[ 6726.658464]  worker_thread+0x340/0x504
[ 6726.658470]  kthread+0x138/0x140
[ 6726.658475]  start_kernel_thread+0x14/0x18
[ 6726.658479]
[ 6726.658483] CPU: 0 UID: 0 PID: 192236 Comm: kworker/0:2 Kdump: loaded Tainted: G    B              6.12.0-rc1-next-20241004-auto #1
[ 6726.658492] Tainted: [B]=BAD_PAGE
[ 6726.658495] Hardware name: IBM,9009-42A POWER9 (architected) 0x4e0202 0xf000005 of:IBM,FW950.A0 (VL950_141) hv:phyp pSeries
[ 6726.658501] Workqueue: xfs-inodegc/sda3 xfs_inodegc_worker [xfs]
[ 6726.658593] ==================================================================


Regards,

Venkat.