]> git.itanic.dy.fi Git - linux-stable/commit
drivers/misc/lkdtm.c: fix race when crashpoint is hit multiple times before checking...
authorJosh Hunt <johunt@akamai.com>
Mon, 27 Jun 2011 23:18:08 +0000 (16:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 9 Jul 2011 06:15:34 +0000 (23:15 -0700)
commitc9b0a3029446f29e59f04d0274537d1e3c83c39a
treee72c433e8faa86c55445ce29ced1349e881150d7
parent283f795cc145256c9eb0c0eaf7392be97d189444
drivers/misc/lkdtm.c: fix race when crashpoint is hit multiple times before checking count

commit aa2c96d6f329e66cc59352b0f12e8f04e6a9593b upstream.

We observed the crash point count going negative in cases where the
crash point is hit multiple times before the check of "count == 0" is
done.  Because of this we never call lkdtm_do_action().  This patch just
adds a spinlock to protect count.

Reported-by: Tapan Dhimant <tdhimant@akamai.com>
Signed-off-by: Josh Hunt <johunt@akamai.com>
Acked-by: Ankita Garg <ankita@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/misc/lkdtm.c