lkml.org 
[lkml]   [2019]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [LKP] Re: [pipe] d60337eff1: BUG:kernel_NULL_pointer_dereference,address
From
Date
Hi David,

Yes, it can fix the problem.

Best Regards,
Rong Chen

On 11/16/2019 12:22 AM, David Howells wrote:
> Actually, no, this is the fix:
>
> diff --git a/lib/iov_iter.c b/lib/iov_iter.c
> index 7006b5b2106d..be2fc5793ddd 100644
> --- a/lib/iov_iter.c
> +++ b/lib/iov_iter.c
> @@ -537,7 +537,7 @@ static size_t push_pipe(struct iov_iter *i, size_t size,
> buf->ops = &default_pipe_buf_ops;
> buf->page = page;
> buf->offset = 0;
> - buf->len = max_t(ssize_t, left, PAGE_SIZE);
> + buf->len = min_t(ssize_t, left, PAGE_SIZE);
> left -= buf->len;
> iter_head++;
> pipe->head = iter_head;
>
> David
> _______________________________________________
> LKP mailing list -- lkp@lists.01.org
> To unsubscribe send an email to lkp-leave@lists.01.org

\
 
 \ /
  Last update: 2019-11-18 08:54    [W:0.103 / U:2.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site