diff options
| -rw-r--r-- | fs/exec.c | 4 | ||||
| -rw-r--r-- | include/linux/sched.h | 7 |
2 files changed, 8 insertions, 3 deletions
| @@ -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; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5f868a588581..4dbb109022f3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -578,7 +578,7 @@ struct task_struct { | |||
| 578 | unsigned long flags; /* per process flags, defined below */ | 578 | unsigned long flags; /* per process flags, defined below */ |
| 579 | unsigned long ptrace; | 579 | unsigned long ptrace; |
| 580 | 580 | ||
| 581 | int lock_depth; /* Lock depth */ | 581 | int lock_depth; /* BKL lock depth */ |
| 582 | 582 | ||
| 583 | int prio, static_prio; | 583 | int prio, static_prio; |
| 584 | struct list_head run_list; | 584 | struct list_head run_list; |
| @@ -661,7 +661,10 @@ struct task_struct { | |||
| 661 | struct key *thread_keyring; /* keyring private to this thread */ | 661 | struct key *thread_keyring; /* keyring private to this thread */ |
| 662 | #endif | 662 | #endif |
| 663 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ | 663 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ |
| 664 | char comm[TASK_COMM_LEN]; | 664 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
| 665 | - access with [gs]et_task_comm (which lock | ||
| 666 | it with task_lock()) | ||
| 667 | - initialized normally by flush_old_exec */ | ||
| 665 | /* file system info */ | 668 | /* file system info */ |
| 666 | int link_count, total_link_count; | 669 | int link_count, total_link_count; |
| 667 | /* ipc stuff */ | 670 | /* ipc stuff */ |
