Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96354535 authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Miklos Szeredi
Browse files

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: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent d6d931ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);