Commit ab133d2d authored by Mark Drayton's avatar Mark Drayton

Fix stacksnoop PID filter

The function FILTER is injected into (trace_stack()) returns void, not int.
parent ee793635
......@@ -93,7 +93,7 @@ void trace_stack(struct pt_regs *ctx) {
if args.pid:
bpf_text = bpf_text.replace('FILTER',
('u32 pid; pid = bpf_get_current_pid_tgid(); ' +
'if (pid != %s) { return 0; }') % (args.pid))
'if (pid != %s) { return; }') % (args.pid))
else:
bpf_text = bpf_text.replace('FILTER', '')
if debug:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment