[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130912064859.GA26737@linux.vnet.ibm.com>
Date: Thu, 12 Sep 2013 12:19:00 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>, anton@...hat.com,
Hemant Kumar Shaw <hkshaw@...ux.vnet.ibm.com>,
masami.hiramatsu.pt@...achi.com,
Mikhail Kulemin <Mikhail.Kulemin@...ibm.com>,
systemtap@...rceware.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uprobes: Fix utask->depth accounting in
handle_trampoline()
* Oleg Nesterov <oleg@...hat.com> [2013-09-11 17:47:26]:
> 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.
>
> Cc: stable@...r.kernel.org
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> Reported-by: Mikhail Kulemin <Mikhail.Kulemin@...ibm.com>
> Reported-by: Hemant Kumar Shaw <hkshaw@...ux.vnet.ibm.com>
Acked-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Mikhail Kulemin has verified that this fix works for him.
> ---
> kernel/events/uprobes.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
> index f356974..ad8e1bd 100644
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -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);
> }
>
> --
> 1.5.5.1
>
>
--
Thanks and Regards
Srikar Dronamraju
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists