Messages in this thread | | | Date | Wed, 2 Apr 2014 19:34:29 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH v2 1/2] procfs: make /proc/*/{stack,syscall,personality} 0400 |
| |
On 03/28, Andrew Morton wrote: > > Now for a six-year-late code review: > > - How the heck can target==current in task_current_syscall()? > > - Less talk, more action: > > From: Andrew Morton <akpm@linux-foundation.org> > Subject: lib/syscall.c: unexport task_current_syscall() > > It is only used by procfs and procfs cannot be a module. > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > --- > > lib/syscall.c | 1 - > 1 file changed, 1 deletion(-) > > diff -puN lib/syscall.c~a lib/syscall.c > --- a/lib/syscall.c~a > +++ a/lib/syscall.c > @@ -72,4 +72,3 @@ int task_current_syscall(struct task_str > > return 0; > } > -EXPORT_SYMBOL_GPL(task_current_syscall);
Well, I guess it was added for external tracing modules like systemtap. And in this case target==current is very likely. And for utrace modules, but it is dead.
I do not see any usage of task_current_syscall() in git://sourceware.org/git/systemtap.git, so this change should not upset systemtap at least.
And if we unexport task_current_syscall(), perhaps we should actually lib/syscall.c. proc_pid_syscall() can use syscall_get_*() instead. Or at least we can simplify it, I don't think /proc/ actually needs wait_task_inactive().
Oleg.
| |