From 3677209239ed71d2654e73eecfab1dbec2af11a9 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 5 May 2005 16:16:12 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/exec.c') diff --git a/fs/exec.c b/fs/exec.c index 52acff3f44f..e56ee243702 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -869,9 +869,11 @@ int flush_old_exec(struct linux_binprm * bprm) if (current->euid == current->uid && current->egid == current->gid) current->mm->dumpable = 1; name = bprm->filename; + + /* Copies the binary name from after last slash */ for (i=0; (ch = *(name++)) != '\0';) { if (ch == '/') - i = 0; + i = 0; /* overwrite what we wrote */ else if (i < (sizeof(tcomm) - 1)) tcomm[i++] = ch; -- cgit v1.2.3