[Bug,203947,xfstests,generic/475] : general protection fault: 0000 [#1] RIP: 0010:xfs_setfilesize_ioend+0xb1/0x220 [xfs]
diff mbox series

Message ID bug-203947-201763-1ou6q7Q6oR@https.bugzilla.kernel.org/
State New
Headers show
Series
  • [Bug,203947,xfstests,generic/475] : general protection fault: 0000 [#1] RIP: 0010:xfs_setfilesize_ioend+0xb1/0x220 [xfs]
Related show

Commit Message

bugzilla-daemon@bugzilla.kernel.org June 29, 2019, 5:35 p.m. UTC
https://bugzilla.kernel.org/show_bug.cgi?id=203947

--- Comment #9 from Darrick J. Wong (djwong+kernel@djwong.org) ---
Zorro,

If you get a chance, can you try this debugging patch, please?

Patch
diff mbox series

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index baf0b72c0a37..1bf408255349 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -3846,6 +3846,12 @@  xfs_bmapi_read(
                return 0;
        }

+       if (!ifp) {
+               xfs_err(mp, "NULL FORK, inode x%llx fork %d??",
+                               ip->i_ino, whichfork);
+               return -EFSCORRUPTED;
+       }
+
        if (!(ifp->if_flags & XFS_IFEXTENTS)) {
                error = xfs_iread_extents(NULL, ip, whichfork);
                if (error)