History

tracing/kprobes: Fix strpbrk() argument order

Fix strpbrk()'s argument order, it must pass acceptable string in 2nd argument. Note that this can cause a kernel panic where it recovers backup character to code->data. Link: http://lkml.kernel.org/r/154108256792.2604.1816052586385217811.stgit@devbox

Masami Hiramatsu committed 8 years ago

Commit ee474b81 parent 65102231 file · +1 −1Browse files

Unified · Split

kernel/trace/trace_probe.c+1−1
@@ -535,7 +535,7 @@ int traceprobe_update_arg(struct probe_arg *arg) · 534 unmodified lines
535 if (code[1].op != FETCH_OP_IMM)535 if (code[1].op != FETCH_OP_IMM)
536 return -EINVAL;536 return -EINVAL;
537 537
538 tmp = strpbrk("+-", code->data);538 tmp = strpbrk(code->data, "+-");
539 if (tmp)539 if (tmp)
540 c = *tmp;540 c = *tmp;
541 ret = traceprobe_split_symbol_offset(code->data,541 ret = traceprobe_split_symbol_offset(code->data,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t