// FIXME: SAFETY CHECK
if (result)
{ // return to safe state
- detach_selected_probes ();
+ unset_kernel_probes();
spin_lock_irqsave (&ec_spinlock, spinlock_flags); // make other CPUs wait
ec_info.ec_state = EC_STATE_IDLE;
// FIXME: SAFETY CHECK
if (result)
{ // return to safe state
- detach_selected_probes ();
+ unset_kernel_probes();
spin_lock_irqsave (&ec_spinlock, spinlock_flags); // make other CPUs wait
ec_info.ec_state = EC_STATE_IDLE;
spin_unlock_irqrestore (&ec_spinlock, spinlock_flags); // open our data for other CPUs
ret = deinst_usr_space_proc ();
- result = detach_selected_probes ();
+ result = unset_kernel_probes();
if (result == 0)
result = ret;
void
probes_manager_down (void)
{
- detach_selected_probes ();
+ unset_kernel_probes();
uninit_helper();
storage_down ();
}
if (ret) {
/* return into safe state */
/* FIXME: unset for installed probes */
- detach_selected_probes();
+ unset_kernel_probes();
break;
}
}
return ret;
}
-int
-detach_selected_probes (void)
+int unset_kernel_probes(void)
{
kernel_probe_t *p;
struct hlist_node *node;
- swap_hlist_for_each_entry_rcu (p, node, &kernel_probes, hlist)
- unregister_kernel_probe (p);
+ swap_hlist_for_each_entry_rcu(p, node, &kernel_probes, hlist)
+ unregister_kernel_probe(p);
return 0;
}
extern int remove_probe (unsigned long addr);
int set_kernel_probes(void);
-extern int detach_selected_probes(void);
+int unset_kernel_probes(void);
extern unsigned long def_jprobe_event_pre_handler (kernel_probe_t * probe, struct pt_regs *regs);
extern void def_jprobe_event_handler (unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5, unsigned long arg6);
EPRINTF("Invalid buffer size!");
return -1;
}
- detach_selected_probes ();
+ unset_kernel_probes();
if(UninitializeBuffer() == -1)
EPRINTF("Cannot uninitialize buffer!");
if(InitializeBuffer(nSize) == -1) {
ResetSingleBuffer();
- detach_selected_probes ();
+ unset_kernel_probes();
spin_lock_irqsave (&ec_spinlock, spinlock_flags);
ec_info.buffer_effect = ec_info.buffer_size;