aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-sql.py
diff options
context:
space:
mode:
authorTadeusz Struk <[email protected]>2018-05-22 14:37:18 -0700
committerJarkko Sakkinen <[email protected]>2018-05-30 20:11:31 +0300
commit3ab2011ea368ec3433ad49e1b9e1c7b70d2e65df (patch)
tree83807afb8ea61e77a8d2a2ed698e0c7615390938 /tools/perf/scripts/python/call-graph-from-sql.py
parent424eaf910c329ab06ad03a527ef45dcf6a328f00 (diff)
tpm: fix race condition in tpm_common_write()
There is a race condition in tpm_common_write function allowing two threads on the same /dev/tpm<N>, or two different applications on the same /dev/tpmrm<N> to overwrite each other commands/responses. Fixed this by taking the priv->buffer_mutex early in the function. Also converted the priv->data_pending from atomic to a regular size_t type. There is no need for it to be atomic since it is only touched under the protection of the priv->buffer_mutex. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: [email protected] Signed-off-by: Tadeusz Struk <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions