Commit c9b0a302 authored by Josh Hunt's avatar Josh Hunt Committed by Greg Kroah-Hartman
Browse files

drivers/misc/lkdtm.c: fix race when crashpoint is hit multiple times before checking count



commit aa2c96d6 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: default avatarTapan Dhimant <tdhimant@akamai.com>
Signed-off-by: default avatarJosh Hunt <johunt@akamai.com>
Acked-by: default avatarAnkita Garg <ankita@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 283f795c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment