From: Stephen Rothwell Date: Tue, 13 Sep 2016 03:47:33 +0000 (+1000) Subject: Merge branch 'akpm-current/current' X-Git-Url: http://git.efficios.com/?p=deliverable%2Flinux.git;a=commitdiff_plain;h=53fdf99f676bada351aebb9eb098b5d7ac153cd1 Merge branch 'akpm-current/current' --- 53fdf99f676bada351aebb9eb098b5d7ac153cd1 diff --cc arch/x86/kernel/process.c index c1fa790c81cd,857a686eba5e..5308fb39e304 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@@ -509,21 -508,9 +509,20 @@@ unsigned long arch_align_stack(unsigne unsigned long arch_randomize_brk(struct mm_struct *mm) { - unsigned long range_end = mm->brk + 0x02000000; - return randomize_range(mm->brk, range_end, 0) ? : mm->brk; + return randomize_page(mm->brk, 0x02000000); } +/* + * Return saved PC of a blocked thread. + * What is this good for? it will be always the scheduler or ret_from_fork. + */ +unsigned long thread_saved_pc(struct task_struct *tsk) +{ + struct inactive_task_frame *frame = + (struct inactive_task_frame *) READ_ONCE(tsk->thread.sp); + return READ_ONCE_NOCHECK(frame->ret_addr); +} + /* * Called from fs/proc with a reference on @p to find the function * which called into schedule(). This needs to be done carefully diff --cc include/linux/relay.h index ecbb34a382b8,61355f1cc1bf..ab0c59e94710 --- a/include/linux/relay.h +++ b/include/linux/relay.h @@@ -19,7 -19,7 +19,8 @@@ #include #include #include +#include + #include /* * Tracks changes to rchan/rchan_buf structs