diff options
| author | Yuto Ohnuki <ytohnuki@amazon.com> | 2026-03-10 18:38:38 +0000 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-03-18 09:40:31 +0100 |
| commit | 79ef34ec0554ec04bdbafafbc9836423734e1bd6 (patch) | |
| tree | dfbb181b2c9a2ce970f4540fadd58ba4cc7eb791 /include/mtd/git@git.tavy.me:linux.git | |
| parent | 4f24a767e3d64a5f58c595b5c29b6063a201f1e3 (diff) | |
xfs: avoid dereferencing log items after push callbacks
After xfsaild_push_item() calls iop_push(), the log item may have been
freed if the AIL lock was dropped during the push. Background inode
reclaim or the dquot shrinker can free the log item while the AIL lock
is not held, and the tracepoints in the switch statement dereference
the log item after iop_push() returns.
Fix this by capturing the log item type, flags, and LSN before calling
xfsaild_push_item(), and introducing a new xfs_ail_push_class trace
event class that takes these pre-captured values and the ailp pointer
instead of the log item pointer.
Reported-by: syzbot+652af2b3c5569c4ab63c@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=652af2b3c5569c4ab63c
Fixes: 90c60e164012 ("xfs: xfs_iflush() is no longer necessary")
Cc: stable@vger.kernel.org # v5.9
Signed-off-by: Yuto Ohnuki <ytohnuki@amazon.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'include/mtd/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
