aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 282240afe99e..966c5c5b6741 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -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
950void get_task_comm(char *buf, struct task_struct *tsk) 950char *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
958void set_task_comm(struct task_struct *tsk, char *buf) 959void set_task_comm(struct task_struct *tsk, char *buf)