aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-05-05 19:16:12 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 19:36:48 -0400
commit3677209239ed71d2654e73eecfab1dbec2af11a9 (patch)
tree125d9d7553c5f6dc6ad030e4c829a5bf71ab3ef5 /fs/exec.c
parent291c4a75ce7632ee5c565359fb875ba0597f76be (diff)
[PATCH] comments on locking of task->comm
Add some comments about task->comm, to explain what it is near its definition and provide some important pointers to its uses. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 52acff3f44f0..e56ee2437025 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -869,9 +869,11 @@ int flush_old_exec(struct linux_binprm * bprm)
869 if (current->euid == current->uid && current->egid == current->gid) 869 if (current->euid == current->uid && current->egid == current->gid)
870 current->mm->dumpable = 1; 870 current->mm->dumpable = 1;
871 name = bprm->filename; 871 name = bprm->filename;
872
873 /* Copies the binary name from after last slash */
872 for (i=0; (ch = *(name++)) != '\0';) { 874 for (i=0; (ch = *(name++)) != '\0';) {
873 if (ch == '/') 875 if (ch == '/')
874 i = 0; 876 i = 0; /* overwrite what we wrote */
875 else 877 else
876 if (i < (sizeof(tcomm) - 1)) 878 if (i < (sizeof(tcomm) - 1))
877 tcomm[i++] = ch; 879 tcomm[i++] = ch;