Messages in this thread | | | From | Nick Piggin <> | Subject | Re: [patch 1/5] vmalloc: do not check for freed locks on user maps | Date | Thu, 6 Mar 2008 03:28:19 +1100 |
| |
On Thursday 06 March 2008 03:03, Thomas Gleixner wrote: > User maps do not contain kernel internal objects. No need to check > them.
Why not? Depends on your definition of kernel internal... and objects ;)
Drivers could create and manage some objects in this vmalloc area. They are no longer internal if you map them to userspace, but I still don't think you want to vunmap it until those object lifetimes are finished.
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > Acked-by: Ingo Molnar <mingo@elte.hu> > --- > mm/vmalloc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > Index: linux-2.6/mm/vmalloc.c > =================================================================== > --- linux-2.6.orig/mm/vmalloc.c > +++ linux-2.6/mm/vmalloc.c > @@ -382,7 +382,8 @@ static void __vunmap(const void *addr, i > return; > } > > - debug_check_no_locks_freed(addr, area->size); > + if (!(area->flags & VM_USERMAP)) > + debug_check_no_locks_freed(addr, area->size); > > if (deallocate_pages) { > int i;
| |