This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
- From: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- To: "wenji dot huang at oracle dot com" <sourceware-bugzilla at sourceware dot org>
- Cc: systemtap at sources dot redhat dot com
- Date: Tue, 21 Jul 2009 10:36:45 +0530
- Subject: Re: [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
- References: <20090720202932.10421.dsmith@redhat.com> <20090721044059.24516.qmail@sourceware.org>
- Reply-to: ananth at in dot ibm dot com
On Tue, Jul 21, 2009 at 04:40:59AM -0000, wenji dot huang at oracle dot com wrote:
> Sorry, don't notice it. So the sequence should be like the follwing?
> ...
> struct pid *p_pid = find_get_pid(t_pid);
> t = pid_task(p_pid, PIDTYPE_PID);
> put_pid(p_pid);
> ...
Yes that should work, though you don't check for p_pid == NULL, 'cos
pid_task and put_pid have stubs that check for it.