Commit f563dab4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

goldfish_pipe: fix build warning about using too much stack.

The new goldfish_pipe code used too much stack space in the
transfer_max_buffers() call.  As the function is serialized with a lock,
let's make the buffer static to not use the stack for the large buffer.
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Cc: Yurii Zubrytskyi <zyy@google.com>
Cc: Jin Qian <jinqian@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 726ea1a8
...@@ -385,7 +385,7 @@ static int transfer_max_buffers(struct goldfish_pipe *pipe, ...@@ -385,7 +385,7 @@ static int transfer_max_buffers(struct goldfish_pipe *pipe,
unsigned long last_page, unsigned int last_page_size, unsigned long last_page, unsigned int last_page_size,
s32 *consumed_size, int *status) s32 *consumed_size, int *status)
{ {
struct page *pages[MAX_BUFFERS_PER_COMMAND]; static struct page *pages[MAX_BUFFERS_PER_COMMAND];
unsigned long first_page = address & PAGE_MASK; unsigned long first_page = address & PAGE_MASK;
unsigned int iter_last_page_size; unsigned int iter_last_page_size;
int pages_count = pin_user_pages(first_page, last_page, int pages_count = pin_user_pages(first_page, last_page,
...@@ -409,10 +409,10 @@ static int transfer_max_buffers(struct goldfish_pipe *pipe, ...@@ -409,10 +409,10 @@ static int transfer_max_buffers(struct goldfish_pipe *pipe,
*consumed_size = pipe->command_buffer->rw_params.consumed_size; *consumed_size = pipe->command_buffer->rw_params.consumed_size;
mutex_unlock(&pipe->lock);
release_user_pages(pages, pages_count, is_write, *consumed_size); release_user_pages(pages, pages_count, is_write, *consumed_size);
mutex_unlock(&pipe->lock);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment