From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28732 invoked by alias); 12 Sep 2013 06:49:10 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 28722 invoked by uid 89); 12 Sep 2013 06:49:10 -0000 Received: from e39.co.us.ibm.com (HELO e39.co.us.ibm.com) (32.97.110.160) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 12 Sep 2013 06:49:10 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e39.co.us.ibm.com Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Sep 2013 00:49:07 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e39.co.us.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 12 Sep 2013 00:49:06 -0600 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 2DA501FF001A for ; Thu, 12 Sep 2013 00:49:03 -0600 (MDT) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8C6n5ld340206 for ; Thu, 12 Sep 2013 00:49:05 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r8C6n4pF000371 for ; Thu, 12 Sep 2013 00:49:05 -0600 Received: from kernel.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r8C6n3NW000363; Thu, 12 Sep 2013 00:49:04 -0600 Received: from linux.vnet.ibm.com (srdronam.in.ibm.com [9.124.31.34]) by kernel.stglabs.ibm.com (Postfix) with SMTP id 46E6E24001D; Wed, 11 Sep 2013 23:49:01 -0700 (PDT) Date: Thu, 12 Sep 2013 06:49:00 -0000 From: Srikar Dronamraju To: Oleg Nesterov Cc: Ingo Molnar , anton@redhat.com, Hemant Kumar Shaw , masami.hiramatsu.pt@hitachi.com, Mikhail Kulemin , systemtap@sourceware.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] uprobes: Fix utask->depth accounting in handle_trampoline() Message-ID: <20130912064859.GA26737@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20130911154726.GA8093@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130911154726.GA8093@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13091206-9332-0000-0000-000001642B9F X-IsSubscribed: yes X-SW-Source: 2013-q3/txt/msg00308.txt.bz2 * Oleg Nesterov [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 > Reported-by: Mikhail Kulemin > Reported-by: Hemant Kumar Shaw Acked-by: Srikar Dronamraju 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