The patch titled taskstats: add_del_listener() should ignore !valid listeners has been removed from the -mm tree. Its filename was taskstats-add_del_listener-should-ignore-valid-listeners.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: taskstats: add_del_listener() should ignore !valid listeners From: Oleg Nesterov <oleg@xxxxxxxxxx> When send_cpu_listeners() finds the orphaned listener it marks it as !valid and drops listeners->sem. Before it takes this sem for writing, s->pid can be reused and add_del_listener() can wrongly try to re-use this entry. Change add_del_listener() to check ->valid = T. Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx> Reviewed-by: Vasiliy Kulikov <segoon@xxxxxxxxxxxx> Acked-by: Balbir Singh <bsingharora@xxxxxxxxx> Cc: Jerome Marchand <jmarchan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/taskstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/taskstats.c~taskstats-add_del_listener-should-ignore-valid-listeners kernel/taskstats.c --- a/kernel/taskstats.c~taskstats-add_del_listener-should-ignore-valid-listeners +++ a/kernel/taskstats.c @@ -304,7 +304,7 @@ static int add_del_listener(pid_t pid, c listeners = &per_cpu(listener_array, cpu); down_write(&listeners->sem); list_for_each_entry(s2, &listeners->list, list) { - if (s2->pid == pid) + if (s2->pid == pid && s2->valid) goto exists; } list_add(&s->list, &listeners->list); _ Patches currently in -mm which might be from oleg@xxxxxxxxxx are ipc-introduce-shm_rmid_forced-sysctl-testing.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