From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
anton@redhat.com, Hemant Kumar Shaw <hkshaw@linux.vnet.ibm.com>,
masami.hiramatsu.pt@hitachi.com,
Mikhail Kulemin <Mikhail.Kulemin@ru.ibm.com>,
systemtap@sourceware.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uprobes: Fix utask->depth accounting in handle_trampoline()
Date: Thu, 12 Sep 2013 12:19:00 +0530 [thread overview]
Message-ID: <20130912064859.GA26737@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130911154726.GA8093@redhat.com>
* Oleg Nesterov <oleg@redhat.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@vger.kernel.org
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> Reported-by: Mikhail Kulemin <Mikhail.Kulemin@ru.ibm.com>
> Reported-by: Hemant Kumar Shaw <hkshaw@linux.vnet.ibm.com>
Acked-by: Srikar Dronamraju <srikar@linux.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
next prev parent reply other threads:[~2013-09-12 6:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 15:47 [PATCH] uprobes: Fix utask->depth accounting in handle_trampoline() Oleg Nesterov
2013-09-12 6:49 ` Srikar Dronamraju [this message]
2013-09-12 11:11 ` [tip:perf/urgent] uprobes: Fix utask-> depth " tip-bot for Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130912064859.GA26737@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=Mikhail.Kulemin@ru.ibm.com \
--cc=anton@redhat.com \
--cc=hkshaw@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.