diff options
| author | David Hildenbrand <[email protected]> | 2020-11-11 15:53:16 +0100 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2020-11-19 16:56:58 +1100 |
| commit | d6718941a2767fb383e105d257d2105fe4f15f0e (patch) | |
| tree | 7a3a30e5af52d24cb847251a3fd9027d5d6b5d57 /tools/perf/scripts/python | |
| parent | c74cf7a3d59a21b290fe0468f5b470d0b8ee37df (diff) | |
powerpc/powernv/memtrace: Fix crashing the kernel when enabling concurrently
It's very easy to crash the kernel right now by simply trying to
enable memtrace concurrently, hammering on the "enable" interface
loop.sh:
#!/bin/bash
dmesg --console-off
while true; do
echo 0x40000000 > /sys/kernel/debug/powerpc/memtrace/enable
done
[root@localhost ~]# loop.sh &
[root@localhost ~]# loop.sh &
Resulting quickly in a kernel crash. Let's properly protect using a
mutex.
Fixes: 9d5171a8f248 ("powerpc/powernv: Enable removal of memory for in memory tracing")
Cc: [email protected]# v4.14+
Signed-off-by: David Hildenbrand <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions