staging: dgnc: take a lock when storing value in dgnc_poll_tick
authorSalah Triki <salah.triki@acm.org>
Sun, 4 Oct 2015 01:49:48 +0000 (02:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 08:30:14 +0000 (09:30 +0100)
commit51abf45c23872df0a43dbe849eb4439ebda6145f
treeb89016372e4bbc02e242fbe238181702fc29a2ca
parent6d99d6a3cffdcbf1705ebd41b528fc31feaa7966
staging: dgnc: take a lock when storing value in dgnc_poll_tick

Reads of dgnc_poll_tick are protected by dgnc_poll_lock spinlock, but the write
to dgnc_poll_tick is not. It could theoretically race.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_driver.c
drivers/staging/dgnc/dgnc_driver.h
drivers/staging/dgnc/dgnc_sysfs.c