diff options
-rw-r--r-- | fs/exec.c | 3 | ||||
-rw-r--r-- | include/linux/sched.h | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -947,12 +947,13 @@ static void flush_old_files(struct files_struct * files) | |||
947 | spin_unlock(&files->file_lock); | 947 | spin_unlock(&files->file_lock); |
948 | } | 948 | } |
949 | 949 | ||
950 | void get_task_comm(char *buf, struct task_struct *tsk) | 950 | char *get_task_comm(char *buf, struct task_struct *tsk) |
951 | { | 951 | { |
952 | /* buf must be at least sizeof(tsk->comm) in size */ | 952 | /* buf must be at least sizeof(tsk->comm) in size */ |
953 | task_lock(tsk); | 953 | task_lock(tsk); |
954 | strncpy(buf, tsk->comm, sizeof(tsk->comm)); | 954 | strncpy(buf, tsk->comm, sizeof(tsk->comm)); |
955 | task_unlock(tsk); | 955 | task_unlock(tsk); |
956 | return buf; | ||
956 | } | 957 | } |
957 | 958 | ||
958 | void set_task_comm(struct task_struct *tsk, char *buf) | 959 | void set_task_comm(struct task_struct *tsk, char *buf) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index af6947e69b40..680bb03a4b90 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 | |||
1770 | struct task_struct *fork_idle(int); | 1770 | struct task_struct *fork_idle(int); |
1771 | 1771 | ||
1772 | extern void set_task_comm(struct task_struct *tsk, char *from); | 1772 | extern void set_task_comm(struct task_struct *tsk, char *from); |
1773 | extern void get_task_comm(char *to, struct task_struct *tsk); | 1773 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
1774 | 1774 | ||
1775 | #ifdef CONFIG_SMP | 1775 | #ifdef CONFIG_SMP |
1776 | extern void wait_task_inactive(struct task_struct * p); | 1776 | extern void wait_task_inactive(struct task_struct * p); |