lkml.org 
[lkml]   [2016]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] mm: remove free_unmap_vmap_area_addr
On Thu, 20 Oct 2016 17:46:36 -0700
Joel Fernandes <joelaf@google.com> wrote:

> > @@ -1100,10 +1091,14 @@ void vm_unmap_ram(const void *mem, unsigned int count)
> > debug_check_no_locks_freed(mem, size);
> > vmap_debug_free_range(addr, addr+size);
> >
> > - if (likely(count <= VMAP_MAX_ALLOC))
> > + if (likely(count <= VMAP_MAX_ALLOC)) {
> > vb_free(mem, size);
> > - else
> > - free_unmap_vmap_area_addr(addr);
> > + return;
> > + }
> > +
> > + va = find_vmap_area(addr);
> > + BUG_ON(!va);
>
> Considering recent objections to BUG_ON [1], lets make this a WARN_ON
> while we're moving the code?

If you lost track of your kernel memory mappings, you are in big trouble
and fail stop is really the best course of action for containing the
problem, which could have security and data corruption implications. This
is covered by Linus' last paragraph in that commit.

Thanks,
Nick

\
 
 \ /
  Last update: 2016-10-21 03:59    [W:0.061 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site