summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:07 +0000
commit6c080a1a353c6fc2590555ec7dd8982d1143d02d (patch)
tree5fb60c5cd3d6bb6496650d1605a3c51d09be2bf1 /fs/btrfs/send.c
parentAdding debian version 6.1.85-1. (diff)
downloadlinux-6c080a1a353c6fc2590555ec7dd8982d1143d02d.tar.xz
linux-6c080a1a353c6fc2590555ec7dd8982d1143d02d.zip
Merging upstream version 6.1.90.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 9f7ffd9ef..754a9fb01 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1015,7 +1015,15 @@ static int iterate_inode_ref(struct btrfs_root *root, struct btrfs_path *path,
ret = PTR_ERR(start);
goto out;
}
- BUG_ON(start < p->buf);
+ if (unlikely(start < p->buf)) {
+ btrfs_err(root->fs_info,
+ "send: path ref buffer underflow for key (%llu %u %llu)",
+ found_key->objectid,
+ found_key->type,
+ found_key->offset);
+ ret = -EINVAL;
+ goto out;
+ }
}
p->start = start;
} else {