Re: [PATCH] Export mm_update_next_owner function for unuse_mm.

2018-12-18 Thread Matthew Wilcox
On Tue, Dec 18, 2018 at 11:42:11AM +0800, gchen.guo...@gmail.com wrote: > +EXPORT_SYMBOL(mm_update_next_owner); Unless you've figured out how to build mmu_context.c as a module, you don't need to EXPORT the symbol. Just the below hunk is enough. > diff --git a/mm/mmu_context.c

Re: [PATCH] Export mm_update_next_owner function for unuse_mm.

2018-12-17 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 11:42:11AM +0800, gchen.guo...@gmail.com wrote: > From: guomin chen > > When mm->owner is modified by exit_mm, if the new owner directly calls > unuse_mm to exit, it will cause Use-After-Free. Due to the unuse_mm() > directly sets tsk->mm=NULL. > > Under normal

[PATCH] Export mm_update_next_owner function for unuse_mm.

2018-12-17 Thread gchen . guomin
From: guomin chen When mm->owner is modified by exit_mm, if the new owner directly calls unuse_mm to exit, it will cause Use-After-Free. Due to the unuse_mm() directly sets tsk->mm=NULL. Under normal circumstances,When do_exit exits, mm->owner will be updated on exit_mm(). but when the kernel