mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-25 02:59:30 +07:00
fuse: reduce allocation size for splice_write
The 'bufs' array contains 'pipe->buffers' elements, but the fuse_dev_splice_write() uses only 'pipe->nrbufs' elements. So reduce the allocation size to 'pipe->nrbufs' elements. Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
d6d931adce
commit
9635453572
@ -1957,7 +1957,7 @@ static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe,
|
||||
|
||||
pipe_lock(pipe);
|
||||
|
||||
bufs = kvmalloc_array(pipe->buffers, sizeof(struct pipe_buffer),
|
||||
bufs = kvmalloc_array(pipe->nrbufs, sizeof(struct pipe_buffer),
|
||||
GFP_KERNEL);
|
||||
if (!bufs) {
|
||||
pipe_unlock(pipe);
|
||||
|
Loading…
Reference in New Issue
Block a user