提交 878b5a6e 编写于 作者: O Oleg Nesterov 提交者: Ingo Molnar

uprobes: Fix utask->depth accounting in handle_trampoline()

Currently utask->depth is simply the number of allocated/pending
return_instance's in uprobe_task->return_instances list.

handle_trampoline() should decrement this counter every time we
handle/free an instance, but due to typo it does this only if
->chained == T. This means that in the likely case this counter
is never decremented and the probed task can't report more than
MAX_URETPROBE_DEPTH events.
Reported-by: NMikhail Kulemin <Mikhail.Kulemin@ru.ibm.com>
Reported-by: NHemant Kumar Shaw <hkshaw@linux.vnet.ibm.com>
Signed-off-by: NOleg Nesterov <oleg@redhat.com>
Acked-by: NAnton Arapov <anton@redhat.com>
Cc: masami.hiramatsu.pt@hitachi.com
Cc: srikar@linux.vnet.ibm.com
Cc: systemtap@sourceware.org
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20130911154726.GA8093@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 6113af14
...@@ -1682,12 +1682,10 @@ static bool handle_trampoline(struct pt_regs *regs) ...@@ -1682,12 +1682,10 @@ static bool handle_trampoline(struct pt_regs *regs)
tmp = ri; tmp = ri;
ri = ri->next; ri = ri->next;
kfree(tmp); kfree(tmp);
utask->depth--;
if (!chained) if (!chained)
break; break;
utask->depth--;
BUG_ON(!ri); BUG_ON(!ri);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册