Re: [PATCH 1/2] tracing/function: fix the return value offtrace_trace_onoff_callback()

From: Frederic Weisbecker
Date: Thu Jul 16 2009 - 23:36:14 EST


On Thu, Jul 16, 2009 at 05:29:27PM +0800, Li Zefan wrote:
> >> ftrace_trace_onoff_callback() will return error even if we do the
> >> right operation, for example:
> >>
> >> # echo _spin_*:traceon:10 > set_ftrace_filter
> >> -bash: echo: write error: Invalid argument
> >> # cat set_ftrace_filter
> >> #### all functions enabled ####
> >> _spin_trylock_bh:traceon:count=10
> >> _spin_unlock_irq:traceon:count=10
> >> _spin_unlock_bh:traceon:count=10
> >> _spin_lock_irq:traceon:count=10
> >> _spin_unlock:traceon:count=10
> >> _spin_trylock:traceon:count=10
> >> _spin_unlock_irqrestore:traceon:count=10
> >> _spin_lock_irqsave:traceon:count=10
> >> _spin_lock_bh:traceon:count=10
> >> _spin_lock:traceon:count=10
> >>
> >> We want to set _spin_*:traceon:10 to set_ftrace_filter, it complain
> >> with "Invalid argument", but the operation is successful.
> >> So, this patch fix it.
> >>
> >> Signed-off-by: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
> >
> > Looks good, thanks.
> >
> > Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> >
>
> Reviewed-by: Li Zefan <lizf@xxxxxxxxxxxxxx>
>


Thanks!
I'm queuing it in the fixes for 2.6.31 and also add a Cc: stable@xxxxxxxxxx
tag because the fix also applies on .30

I've also detailed a bit more the changelog, see below:
---