]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs: testcase for kernelspace xfs_fsr extent handling flaw
authorEric Sandeen <sandeen@redhat.com>
Sat, 5 Nov 2016 02:00:09 +0000 (21:00 -0500)
committerEryu Guan <eguan@redhat.com>
Sun, 13 Nov 2016 06:01:07 +0000 (14:01 +0800)
commit052b0777d7cc61679226e1526a5a4bd727d5be27
tree60c6268d23553d81bfb35912b0afc15eca78753b
parent00d42708c2231ddd2953d23d79d24d32f1b62661
xfs: testcase for kernelspace xfs_fsr extent handling flaw

This is a testcase for a bug which goes way back; googling
"xfs_trans_log_inode NULL pointer dereference" yields sporadic
reports over several years.

The test sets up several two-extent files with speculative
preallocation on them, and then runs xfs_fsr.  The kernelside
code ignores the preallocation, and therefore sets up the
temporary inode incorrectly after the inode fork swap.

It is a "dangerous" test because the extent mishandling on
the temporary inode causes a null pointer dereference and
oops when the inode's i_itemp pointer gets overwritten
and we blow up in logging code that tries to use it.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/xfs/118 [new file with mode: 0755]
tests/xfs/118.out [new file with mode: 0644]
tests/xfs/group