summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc/dgnc_driver.h
diff options
context:
space:
mode:
authorSalah Triki <salah.triki@acm.org>2015-10-04 02:49:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 09:30:14 +0100
commit51abf45c23872df0a43dbe849eb4439ebda6145f (patch)
treeb89016372e4bbc02e242fbe238181702fc29a2ca /drivers/staging/dgnc/dgnc_driver.h
parent6d99d6a3cffdcbf1705ebd41b528fc31feaa7966 (diff)
downloadop-kernel-dev-51abf45c23872df0a43dbe849eb4439ebda6145f.zip
op-kernel-dev-51abf45c23872df0a43dbe849eb4439ebda6145f.tar.gz
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>
Diffstat (limited to 'drivers/staging/dgnc/dgnc_driver.h')
-rw-r--r--drivers/staging/dgnc/dgnc_driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h
index 06ece51..c61884c 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -390,6 +390,7 @@ struct channel_t {
extern uint dgnc_Major; /* Our driver/mgmt major */
extern int dgnc_poll_tick; /* Poll interval - 20 ms */
extern spinlock_t dgnc_global_lock; /* Driver global spinlock */
+extern spinlock_t dgnc_poll_lock; /* Poll scheduling lock */
extern uint dgnc_NumBoards; /* Total number of boards */
extern struct dgnc_board *dgnc_Board[MAXBOARDS]; /* Array of board structs */
OpenPOWER on IntegriCloud