Re: [PATCH v3] prctl: avoid using mmap_sem for exe_file serialization

2015-03-25 Thread Oleg Nesterov
On 03/25, Davidlohr Bueso wrote: > > Changes from v2: use correct exe_file (sigh), per Konstantin. Looks good, thanks! Acked-by: Oleg Nesterov -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v3] prctl: avoid using mmap_sem for exe_file serialization

2015-03-25 Thread Davidlohr Bueso
On Wed, 2015-03-25 at 14:08 +0300, Konstantin Khlebnikov wrote: > Reviewed-by: Konstantin Khlebnikov Thanks. > If this is preparation for future rework of mmap_sem maybe we could > postpone committing this patch. Personally, I think this patch is fine to commit for v4.1, along with your rcu one

Re: [PATCH v3] prctl: avoid using mmap_sem for exe_file serialization

2015-03-25 Thread Konstantin Khlebnikov
On 25.03.2015 13:42, Davidlohr Bueso wrote: Oleg cleverly suggested using xchg() to set the new mm->exe_file instead of calling set_mm_exe_file() which requires some form of serialization -- mmap_sem in this case. For archs that do not have atomic rmw instructions we still fallback to a spinlock

[PATCH v3] prctl: avoid using mmap_sem for exe_file serialization

2015-03-25 Thread Davidlohr Bueso
Oleg cleverly suggested using xchg() to set the new mm->exe_file instead of calling set_mm_exe_file() which requires some form of serialization -- mmap_sem in this case. For archs that do not have atomic rmw instructions we still fallback to a spinlock alternative, so this should always be safe. A