]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: fix inobt magic number check
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 28 Jun 2018 20:11:57 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:57 +0000 (15:11 -0500)
Source kernel commit: 2e050e648ad6c74a2f0a28f645155128be0626ca

In commit a6a781a58befcbd467c ("xfs: have buffer verifier functions
report failing address") the bad magic number return was ported
incorrectly.

Fixes: a6a781a58befcbd467ce843af4eaca3906aa1f08
Reported-by: syzbot+08ab33be0178b76851c8@syzkaller.appspotmail.com
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_ialloc_btree.c

index 3efa769c3a79ad4bcc6ef52a869de79deda13517..287789321aeed2a1ce5cf0162c570491a534e8ea 100644 (file)
@@ -295,7 +295,7 @@ xfs_inobt_verify(
        case cpu_to_be32(XFS_FIBT_MAGIC):
                break;
        default:
-               return NULL;
+               return __this_address;
        }
 
        /* level verification */