Re: syscall_regfunc() && TIF_SYSCALL_TRACEPOINT

From: Steven Rostedt
Date: Fri Mar 30 2012 - 20:13:28 EST


On Fri, 2012-03-30 at 22:15 +0200, Oleg Nesterov wrote:

> > A lot of places test ->mm for kernel threads.
>
> And this is wrong, use_mm() can set ->mm != NULL. This is the common
> mistake.
>
> > Just search for ->mm in
> > kernel/sched/core.c
>
> Probably normalize_rt_tasks() and __sched_setscheduler() should be fixed.

Heh, the __sched_setscheduler() usage is from me. But I'm not sure we
had an alternative back in 2005.


> But I don't really understand why do you think that "clear" is more
> important.

They are both important. But as I tend to consider performance when
tracing is off as critical, I'm more concerned about that. But both must
be fixed, because not reporting traces can confuse a developer.



> Sure, the wrong TIF_SYSCALL_TRACEPOINT triggers the slow
> path unnecessary, but this is more or less harmless. But if we do
> not set the task obviously won't report trace_sys*, this looks like
> a bug even if nothing bad can happen.

Agreed, both are a bug and both should be fixed.

Thanks,

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/