]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs: new test for logical inode resolution panic
authorBoris Burkov <boris@bur.io>
Mon, 19 Dec 2022 20:25:29 +0000 (12:25 -0800)
committerZorro Lang <zlang@kernel.org>
Sun, 25 Dec 2022 13:20:52 +0000 (21:20 +0800)
commitd401145dc1c940dd8ce3016d9fd2c7e76c23b057
tree18378fcf7820e5343eba0fffdfd993063f77a6c2
parent40e983b21375c886f87f2cfc8e34521959d11dd8
btrfs: new test for logical inode resolution panic

If we create a file that has an inline extent followed by a prealloc
extent, then attempt to use the logical to inode ioctl on the prealloc
extent, but in the overwritten range, backref resolution will process
the inline extent. Depending on the leaf eb layout, this can panic.
Add a new test for this condition. In the long run, we can add spew when
we read out-of-bounds fields of inline extent items and simplify this
test to look for dmesg warnings rather than trying to force a fairly
fragile panic (dependent on non-standardized details of leaf layout).

The test causes a kernel panic unless:
btrfs: fix logical_ino ioctl panic
is applied to the kernel.

Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/299 [new file with mode: 0755]
tests/btrfs/299.out [new file with mode: 0644]