Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315316
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH, REGRESSION v4] mm: make apply_to_page_range more robust |
| Date | 2016-01-22 23:00 +0100 |
| Message-ID | <qTRUn-1vG-17@gated-at.bofh.it> (permalink) |
| References | <qTENr-Wu-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Fri, 22 Jan 2016, Mika Penttilä wrote:
> diff --git a/mm/memory.c b/mm/memory.c
> index 30991f8..9178ee6 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -1871,7 +1871,9 @@ int apply_to_page_range(struct mm_struct *mm, unsigned long addr,
> unsigned long end = addr + size;
> int err;
>
> - BUG_ON(addr >= end);
> + if (WARN_ON(addr >= end))
> + return -EINVAL;
> +
> pgd = pgd_offset(mm, addr);
> do {
> next = pgd_addr_end(addr, end);
This would be fine as a second patch in a 2-patch series. The first patch
should fix change_memory_common() for numpages == 0 by returning without
ever calling this function and triggering the WARN_ON(). Let's fix the
problem.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH, REGRESSION v4] mm: make apply_to_page_range more robust Mika Penttilä <mika.penttila@nextfour.com> - 2016-01-22 09:00 +0100 Re: [PATCH, REGRESSION v4] mm: make apply_to_page_range more robust David Rientjes <rientjes@google.com> - 2016-01-22 23:00 +0100
csiph-web