|
@@ -561,9 +561,9 @@ static __kprobes void kprobe_optimizer(struct work_struct *work)
|
|
{
|
|
{
|
|
LIST_HEAD(free_list);
|
|
LIST_HEAD(free_list);
|
|
|
|
|
|
|
|
+ mutex_lock(&kprobe_mutex);
|
|
/* Lock modules while optimizing kprobes */
|
|
/* Lock modules while optimizing kprobes */
|
|
mutex_lock(&module_mutex);
|
|
mutex_lock(&module_mutex);
|
|
- mutex_lock(&kprobe_mutex);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* Step 1: Unoptimize kprobes and collect cleaned (unused and disarmed)
|
|
* Step 1: Unoptimize kprobes and collect cleaned (unused and disarmed)
|
|
@@ -586,8 +586,8 @@ static __kprobes void kprobe_optimizer(struct work_struct *work)
|
|
/* Step 4: Free cleaned kprobes after quiesence period */
|
|
/* Step 4: Free cleaned kprobes after quiesence period */
|
|
do_free_cleaned_kprobes(&free_list);
|
|
do_free_cleaned_kprobes(&free_list);
|
|
|
|
|
|
- mutex_unlock(&kprobe_mutex);
|
|
|
|
mutex_unlock(&module_mutex);
|
|
mutex_unlock(&module_mutex);
|
|
|
|
+ mutex_unlock(&kprobe_mutex);
|
|
|
|
|
|
/* Step 5: Kick optimizer again if needed */
|
|
/* Step 5: Kick optimizer again if needed */
|
|
if (!list_empty(&optimizing_list) || !list_empty(&unoptimizing_list))
|
|
if (!list_empty(&optimizing_list) || !list_empty(&unoptimizing_list))
|