]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
[PATCH] timer statistics: fix race
authorBjorn Steinbrink <B.Steinbrink@gmx.de>
Fri, 1 Jun 2007 07:47:15 +0000 (00:47 -0700)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Jun 2007 18:36:48 +0000 (11:36 -0700)
commit7434011f268211af4a1e4977f5a1eb2004b1a690
tree3e9a5e44c9d50915140f806aacbd5e05d55ca0b8
parent36323d56d52a634758f1288b8a92653b5e6bc1fa
[PATCH] timer statistics: fix race

Fix two races in the timer stats lookup code.  One by ensuring that the
initialization of a new entry is finished upon insertion of that entry.
The other by cleaning up the hash table when the entries array is cleared,
so that we don't have any "pre-inserted" entries.

Thanks to Eric Dumazet for reminding me of the memory barriers.

Signed-off-by: Bjorn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Ian Kumlien <pomac@vapor.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/time/timer_stats.c