Skip to content
Commit c21b89d4 authored by Mark Harmstone's avatar Mark Harmstone Committed by David Sterba
Browse files

btrfs: don't read from userspace twice in btrfs_uring_encoded_read()



If we return -EAGAIN the first time because we need to block,
btrfs_uring_encoded_read() will get called twice. Take a copy of args,
the iovs, and the iter the first time, as by the time we are called the
second time these may have gone out of scope.

Reported-by: default avatarJens Axboe <axboe@kernel.dk>
Fixes: 34310c44 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)")
Signed-off-by: default avatarMark Harmstone <maharmstone@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent b0af20d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment