It was always supposed to be mb(), not rmb(). Signed-off-by: Oleg Nesterov <o...@redhat.com> ---
include/linux/tracehook.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- UTRACE_PTRACE/include/linux/tracehook.h~1_NOTIFY_RESUME_MB 2009-12-17 17:00:31.000000000 +0100 +++ UTRACE_PTRACE/include/linux/tracehook.h 2009-12-17 23:53:51.000000000 +0100 @@ -670,12 +670,12 @@ static inline void tracehook_notify_resu { struct task_struct *task = current; /* - * If we race with attach which sets nonzero ->utrace_flags, - * make sure we do not read ->utrace_flags before the caller - * clears TIF_NOTIFY_RESUME. This pairs with the implicit mb() - * before setting TIF_NOTIFY_RESUME in set_notify_resume(). + * Prevent the following store/load from getting ahead of the + * caller which clears TIF_NOTIFY_RESUME. This pairs with the + * implicit mb() before setting TIF_NOTIFY_RESUME in + * set_notify_resume(). */ - smp_rmb(); + smp_mb(); if (task_utrace_flags(task)) utrace_resume(task, regs); }