Re: [syzbot] [xfs?] KASAN: slab-use-after-free Write in xlog_cil_push_work
From: syzbot
Date: Thu Nov 26 2026 - 11:14:56 EST
> #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
Patch testing via #syz test is temporarily disabled.
See https://github.com/google/syzkaller/issues/8122 for details.
>
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 6c93b4f5629c1..4acd0c3451da9 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1382,6 +1382,9 @@ xfs_buf_submit(
>
> ASSERT(!(bp->b_flags & _XBF_DELWRI_Q));
>
> + if (bp->b_flags & XBF_WRITE)
> + xfs_buf_wait_unpin(bp);
> +
> /*
> * On log shutdown we stale and complete the buffer immediately. We can
> * be called to read the superblock before the log has been set up, so
> @@ -1402,9 +1405,6 @@ xfs_buf_submit(
> goto ioerror;
> }
>
> - if (bp->b_flags & XBF_WRITE)
> - xfs_buf_wait_unpin(bp);
> -
> /*
> * Make sure we capture only current IO errors rather than stale errors
> * left over from previous use of the buffer (e.g. failed readahead).