diff --git a/fs/exec.c b/fs/exec.c index 282240afe99e5e223b1732c4c1b58245d90618d8..966c5c5b6741a25af7c3708fdd3e50e5434d710b 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -947,12 +947,13 @@ static void flush_old_files(struct files_struct * files) spin_unlock(&files->file_lock); } -void get_task_comm(char *buf, struct task_struct *tsk) +char *get_task_comm(char *buf, struct task_struct *tsk) { /* buf must be at least sizeof(tsk->comm) in size */ task_lock(tsk); strncpy(buf, tsk->comm, sizeof(tsk->comm)); task_unlock(tsk); + return buf; } void set_task_comm(struct task_struct *tsk, char *buf) diff --git a/include/linux/sched.h b/include/linux/sched.h index af6947e69b40cb2c9cce3ba291bca296ccb5edd7..680bb03a4b9098d07f03afad76ef3b797f0487a2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1770,7 +1770,7 @@ extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned lon struct task_struct *fork_idle(int); extern void set_task_comm(struct task_struct *tsk, char *from); -extern void get_task_comm(char *to, struct task_struct *tsk); +extern char *get_task_comm(char *to, struct task_struct *tsk); #ifdef CONFIG_SMP extern void wait_task_inactive(struct task_struct * p);