The patch titled POSIX timers RCU optimization fix for clock_gettime has been added to the -mm tree. Its filename is posix-timers-rcu-optimization-for-clock_gettime-fix.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: POSIX timers RCU optimization fix for clock_gettime From: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> Fixes an exit()/posix_cpu_clock_get() race spotted by Oleg Nesterov. Solution is to move the p->signal check under the tasklist_lock. Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: john stultz <johnstul@xxxxxxxxxx> Cc: Roman Zippel <zippel@xxxxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/posix-cpu-timers.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff -puN kernel/posix-cpu-timers.c~posix-timers-rcu-optimization-for-clock_gettime-fix kernel/posix-cpu-timers.c --- a/kernel/posix-cpu-timers.c~posix-timers-rcu-optimization-for-clock_gettime-fix +++ a/kernel/posix-cpu-timers.c @@ -312,10 +312,13 @@ int posix_cpu_clock_get(const clockid_t error = cpu_clock_sample(which_clock, p, &rtn); } - } else if (p->tgid == pid && p->signal) { + } else { read_lock(&tasklist_lock); - error = cpu_clock_sample_group(which_clock, - p, &rtn); + if (p->tgid == pid && p->signal) { + error = + cpu_clock_sample_group(which_clock, + p, &rtn); + } read_unlock(&tasklist_lock); } } _ Patches currently in -mm which might be from paulmck@xxxxxxxxxxxxxxxxxx are git-block.patch add-an-rcu-version-of-list-splicing.patch add-an-rcu-version-of-list-splicing-fix.patch ipmi-fix-some-rcu-problems.patch change-constant-zero-to-notify_done-in-ratelimit_handler.patch posix-timers-rcu-optimization-for-clock_gettime.patch posix-timers-rcu-optimization-for-clock_gettime-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html