diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 6 | ||||
-rw-r--r-- | kernel/fork.c | 3 | ||||
-rw-r--r-- | kernel/sys.c | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 6d2089a1bc..ee6d8b8abe 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -371,6 +371,12 @@ static inline void close_files(struct files_struct * files) | |||
371 | struct fdtable *fdt; | 371 | struct fdtable *fdt; |
372 | 372 | ||
373 | j = 0; | 373 | j = 0; |
374 | |||
375 | /* | ||
376 | * It is safe to dereference the fd table without RCU or | ||
377 | * ->file_lock because this is the last reference to the | ||
378 | * files structure. | ||
379 | */ | ||
374 | fdt = files_fdtable(files); | 380 | fdt = files_fdtable(files); |
375 | for (;;) { | 381 | for (;;) { |
376 | unsigned long set; | 382 | unsigned long set; |
diff --git a/kernel/fork.c b/kernel/fork.c index 8149f36028..533ce27f4b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1062,7 +1062,8 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1062 | * parent's CPU). This avoids alot of nasty races. | 1062 | * parent's CPU). This avoids alot of nasty races. |
1063 | */ | 1063 | */ |
1064 | p->cpus_allowed = current->cpus_allowed; | 1064 | p->cpus_allowed = current->cpus_allowed; |
1065 | if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed))) | 1065 | if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) || |
1066 | !cpu_online(task_cpu(p)))) | ||
1066 | set_task_cpu(p, smp_processor_id()); | 1067 | set_task_cpu(p, smp_processor_id()); |
1067 | 1068 | ||
1068 | /* | 1069 | /* |
diff --git a/kernel/sys.c b/kernel/sys.c index c80412be23..f723522e69 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1728,8 +1728,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
1728 | error = put_user(current->pdeath_signal, (int __user *)arg2); | 1728 | error = put_user(current->pdeath_signal, (int __user *)arg2); |
1729 | break; | 1729 | break; |
1730 | case PR_GET_DUMPABLE: | 1730 | case PR_GET_DUMPABLE: |
1731 | if (current->mm->dumpable) | 1731 | error = current->mm->dumpable; |
1732 | error = 1; | ||
1733 | break; | 1732 | break; |
1734 | case PR_SET_DUMPABLE: | 1733 | case PR_SET_DUMPABLE: |
1735 | if (arg2 < 0 || arg2 > 2) { | 1734 | if (arg2 < 0 || arg2 > 2) { |