]> git.karo-electronics.de Git - karo-tx-linux.git/commit
When send_cpu_listeners() finds the orphaned listener it marks it as
authorOleg Nesterov <oleg@redhat.com>
Wed, 3 Aug 2011 00:52:29 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 3 Aug 2011 04:17:31 +0000 (14:17 +1000)
commitfe975d658c3b8a4f0ed4f2f3876974e2d1c860e2
treec91b5f44dfa8ae861000b38bdcc4b5bcc2e84cf4
parentbe97cb71523e0c9ae632080c2b6cbd0206b3bc3e
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@redhat.com>
Reviewed-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/taskstats.c