]> sourceware.org Git - systemtap.git/commit
kernel-rt fix: delay cleanup of utrace struct after removal from task_utrace_table
authorSerhei Makarov <smakarov@redhat.com>
Wed, 25 Apr 2018 19:52:31 +0000 (15:52 -0400)
committerSerhei Makarov <smakarov@redhat.com>
Fri, 4 May 2018 19:33:18 +0000 (15:33 -0400)
commitb49bd179ece93eb2f497ec58468235972746430a
treed037cdfeed22e852531c8ff9e80df4894477ca28
parent9827e1858ea18f8800875612facb744e67fedd92
kernel-rt fix: delay cleanup of utrace struct after removal from task_utrace_table

Since utrace->lock is now an ordinary spinlock, we cannot grab it in a
(raw) task_utrace_lock section, nor can we do memory management on kernel-rt
in a raw_spinlock section. Thus, in utrace_exit(), we dump utrace structures
to a separate hlist (guarded by a separate, non-raw utrace_cleanup_lock) before
calling utrace_cleanup() to free them.

* runtime/stp_utrace.c (utrace_cleanup_list, utrace_cleanup_lock): new data structures.
(utrace_exit): dump utrace structures to utrace_cleanup_list before releasing
task_utrace_lock and then actually cleaning up.
(utrace_cleanup): now requires utrace_cleanup_lock instead of task_utrace_lock.
runtime/stp_utrace.c
This page took 0.029108 seconds and 5 git commands to generate.