]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/exec.c
Revert "exec: avoid RLIMIT_STACK races with prlimit()"
[mirror_ubuntu-hirsute-kernel.git] / fs / exec.c
index 1d6243d9f2b653e679165099be9332776805b8bd..5688b5e1b9378107597a6117c8c3732889f951d2 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1216,15 +1216,14 @@ killed:
        return -EAGAIN;
 }
 
-char *get_task_comm(char *buf, struct task_struct *tsk)
+char *__get_task_comm(char *buf, size_t buf_size, struct task_struct *tsk)
 {
-       /* buf must be at least sizeof(tsk->comm) in size */
        task_lock(tsk);
-       strncpy(buf, tsk->comm, sizeof(tsk->comm));
+       strncpy(buf, tsk->comm, buf_size);
        task_unlock(tsk);
        return buf;
 }
-EXPORT_SYMBOL_GPL(get_task_comm);
+EXPORT_SYMBOL_GPL(__get_task_comm);
 
 /*
  * These functions flushes out all traces of the currently running executable