diff options
author | Salah Triki | 2015-10-04 03:49:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-10-04 10:30:14 +0200 |
commit | 51abf45c23872df0a43dbe849eb4439ebda6145f (patch) | |
tree | b89016372e4bbc02e242fbe238181702fc29a2ca /drivers/staging/dgnc/dgnc_driver.h | |
parent | staging: dgnc: remove dgnc_init_globals function (diff) | |
download | kernel-qcow2-linux-51abf45c23872df0a43dbe849eb4439ebda6145f.tar.gz kernel-qcow2-linux-51abf45c23872df0a43dbe849eb4439ebda6145f.tar.xz kernel-qcow2-linux-51abf45c23872df0a43dbe849eb4439ebda6145f.zip |
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index 06ece5151fe4..c61884c14777 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 */ |