projects/linux·commit fc4f28bb

Merge tag 'for-5.9-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

fc4f28bb · Linus Torvalds <[email protected]> · 2020-09-14 15:41:58 -07:00

Pull btrfs fix from David Sterba:
 "One of the recent lockdep fixes introduced a bug that breaks the
  search ioctl, which is used by some applications (bees, compsize). The
  patch made it to stable trees so we need this fixup to make it work
  again"

* tag 'for-5.9-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: fix wrong address when faulting in pages in the search ioctl
Commit
fc4f28bb3daf3265d6bc5f73b497306985bb23ab
Parents
973c096f · 1c78544e

Merge commit. Changes below are compared with the first parent: 973c096f.

Changes

1 files changed · +2 −1

FileStatusAddDelContent
fs/btrfs/ioctl.cmodified+2−1View file

fs/btrfs/ioctl.c

View file
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index ac45f02..2d9109d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2193,7 +2193,8 @@ static noinline int search_ioctl(struct inode *inode,
key.offset = sk->min_offset;
while (1) {
- ret = fault_in_pages_writeable(ubuf, *buf_size - sk_offset);
+ ret = fault_in_pages_writeable(ubuf + sk_offset,
+ *buf_size - sk_offset);
if (ret)
break;