]> git.baikalelectronics.ru Git - kernel.git/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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Jun 2011 01:00:13 +0000 (18:00 -0700)
commit76c12dc233716536e60f3377a0f3d2aa539f165b
tree0d7db978da167df605b14d4880969b39caf5e0f4
parent37828ad54fd09a757c884ea942f9f1b629cb4719
drivers/misc/lkdtm.c: fix race when crashpoint is hit multiple times before checking count

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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/lkdtm.c