]> Git Repo - linux.git/commitdiff
uprobes: Fix utask->depth accounting in handle_trampoline()
authorOleg Nesterov <[email protected]>
Wed, 11 Sep 2013 15:47:26 +0000 (17:47 +0200)
committerIngo Molnar <[email protected]>
Thu, 12 Sep 2013 06:00:55 +0000 (08:00 +0200)
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: Mikhail Kulemin <[email protected]>
Reported-by: Hemant Kumar Shaw <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Acked-by: Anton Arapov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/events/uprobes.c

index f3569747d6295043ca3c8a853361a48c2ecf2869..ad8e1bdca70e4c702ff5c6e86255dc74a8b98259 100644 (file)
@@ -1682,12 +1682,10 @@ static bool handle_trampoline(struct pt_regs *regs)
                tmp = ri;
                ri = ri->next;
                kfree(tmp);
+               utask->depth--;
 
                if (!chained)
                        break;
-
-               utask->depth--;
-
                BUG_ON(!ri);
        }
 
This page took 0.062631 seconds and 4 git commands to generate.