diff options
| author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2015-12-22 17:25:19 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 06:23:22 +0200 |
| commit | 30e94dc24edd8d028da6a02d1a85028ead2f40ed (patch) | |
| tree | 25314025d92a08457e97482bf6842d4a729b5348 /tools/perf/scripts/python/sctop.py | |
| parent | a556f0babe56eacf66aee9cc88f4cff98d90d727 (diff) | |
stm class: Fix link list locking
[ Upstream commit c74f7e8281add80bdfa0ad2998b8df287b13df73 ]
Currently, the list of stm_sources linked to an stm device is protected by
a spinlock, which also means that sources' .unlink() method is called under
this spinlock. However, this method may (and does) sleep, which means
trouble.
This patch slightly reworks locking around stm::link_list so that bits that
might_sleep() are called with a mutex held instead. Modification of this
list requires both mutex and spinlock to be held, while looking at the list
can be done under either mutex or spinlock.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions
