[Crash-utility] [PATCH v2 03/10] back_trace: don't check /proc if !LOCAL_ACTIVE()

Dave Anderson anderson at redhat.com
Thu Apr 28 14:57:06 UTC 2016



----- Original Message -----
> 
> 
> ----- Original Message -----
> > On 04/25, Oleg Nesterov wrote:
> > >
> > > -	if (ACTIVE() && !INSTACK(esp, bt)) {
> > > +	if (LOCAL_ACTIVE() && !INSTACK(esp, bt)) {
> > 
> > Of course, this is wrong, please see v2 below.
> > 
> > -------------------------------------------------------------------------------
> > Subject: [PATCH v2 03/10] back_trace: don't check /proc if !LOCAL_ACTIVE()
> > 
> > Obviously the /proc/$tc->pid check can only make sense if LOCAL_ACTIVE().
> > 
> > Signed-off-by: Oleg Nesterov <oleg at redhat.com>
> > ---
> >  kernel.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel.c b/kernel.c
> > index a6fa7a6..cf0a6a0 100644
> > --- a/kernel.c
> > +++ b/kernel.c
> > @@ -2902,7 +2902,7 @@ back_trace(struct bt_info *bt)
> >  
> >  	if (ACTIVE() && !INSTACK(esp, bt)) {
> >  		sprintf(buf, "/proc/%ld", bt->tc->pid);
> > -		if (!file_exists(buf, NULL))
> > +		if (!(LOCAL_ACTIVE() && file_exists(buf, NULL)))
> >  			error(INFO, "task no longer exists\n");
> >  		else
> >  			error(INFO,
> > --
> > 2.5.0
>  
> This doesn't make sense to me.  If it's !LOCAL_ACTIVE() (i.e.
> hybrid-live-dump), then
> why would you want to call file_exists()?
> 
> Shouldn't it be: LOCAL_ACTIVE() and !file_exists()
> 
> Dave
 
Never mind -- I was missing the () around the two items...

Dave
 




More information about the Crash-utility mailing list