diff options
author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2016-02-15 19:12:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 14:09:14 -0800 |
commit | cde4ad8368840e414ecf67db258fe1dabaa5fd2e (patch) | |
tree | 17f5dee33891f9b3aed3e10709a36d285c59b892 /drivers/hwtracing/stm/stm.h | |
parent | 1810f2c44817c74ca3d05d1e3981e3a2e2ceb6f5 (diff) | |
download | op-kernel-dev-cde4ad8368840e414ecf67db258fe1dabaa5fd2e.zip op-kernel-dev-cde4ad8368840e414ecf67db258fe1dabaa5fd2e.tar.gz |
stm class: Guard output assignment against concurrency
It is possible to concurrently assign the same output (a character
device writer or an stm_source device) to different stm devices,
which sets off a strategically placed warning in stm_output_assign().
To avoid this, use a spinlock to serialize (un)assignments between
outputs and stm devices.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/stm/stm.h')
-rw-r--r-- | drivers/hwtracing/stm/stm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwtracing/stm/stm.h b/drivers/hwtracing/stm/stm.h index 97ee022..4e8c6926 100644 --- a/drivers/hwtracing/stm/stm.h +++ b/drivers/hwtracing/stm/stm.h @@ -57,6 +57,7 @@ struct stm_device { container_of((_d), struct stm_device, dev) struct stm_output { + spinlock_t lock; unsigned int master; unsigned int channel; unsigned int nr_chans; |