]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
xfs: fix scrub trace with null pointer in quotacheck
authorAndrey Albershteyn <aalbersh@redhat.com>
Thu, 31 Jul 2025 17:07:22 +0000 (19:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:36:32 +0000 (18:36 +0200)
commit 5d94b19f066480addfcdcb5efde66152ad5a7c0e upstream.

The quotacheck doesn't initialize sc->ip.

Cc: stable@vger.kernel.org # v6.8
Fixes: 21d7500929c8a0 ("xfs: improve dquot iteration for scrub")
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/scrub/trace.h

index d7c4ced47c156744b880504bc6a58b3a9f9a6f06..4368f08e91c68e6ac545901fce9a54ef442a6f03 100644 (file)
@@ -479,7 +479,7 @@ DECLARE_EVENT_CLASS(xchk_dqiter_class,
                __field(xfs_exntst_t, state)
        ),
        TP_fast_assign(
-               __entry->dev = cursor->sc->ip->i_mount->m_super->s_dev;
+               __entry->dev = cursor->sc->mp->m_super->s_dev;
                __entry->dqtype = cursor->dqtype;
                __entry->ino = cursor->quota_ip->i_ino;
                __entry->cur_id = cursor->id;