From: Josh Hunt Date: Mon, 27 Jun 2011 23:18:08 +0000 (-0700) Subject: drivers/misc/lkdtm.c: fix race when crashpoint is hit multiple times before checking... X-Git-Tag: v3.0-rc5~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa2c96d6f329e66cc59352b0f12e8f04e6a9593b;p=pandora-kernel.git 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 Signed-off-by: Josh Hunt Acked-by: Ankita Garg Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed