Message ID | bug-204031-201763@https.bugzilla.kernel.org/ (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [Bug,204031] New: [xfstests generic/475]: general protection fault: 0000 [#1] RIP: 0010:xfs_bmapi_read+0x311/0xb00 [xfs] | expand |
https://bugzilla.kernel.org/show_bug.cgi?id=204031 --- Comment #1 from Zorro Lang (zlang@redhat.com) --- Updata: By merging above patches, I can't reproduce this bug by running generic/475 on six different machines 3 days.
https://bugzilla.kernel.org/show_bug.cgi?id=204031 billodo@redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |billodo@redhat.com --- Comment #2 from billodo@redhat.com --- Is the patch given in Comment 9 suitable for upstream submit?
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)