aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-09-23 19:03:21 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-23 19:03:21 -0400
commit536f8098026bde1368bbfcbcb9682a7637b73df2 (patch)
treecf83d2e1afa503b6aeba103b55cd1da0af4e7a4c /kernel
parente86ee6682b649183c11013a98be02f25e9ae399d (diff)
parent3fd07d3bf0077dcc0f5a33d2eb1938ea050da8da (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c6
-rw-r--r--kernel/fork.c3
-rw-r--r--kernel/printk.c7
-rw-r--r--kernel/sys.c3
4 files changed, 15 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 6d2089a1bce7..ee6d8b8abef5 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 8149f3602881..533ce27f4b2c 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/printk.c b/kernel/printk.c
index a967605bc2e3..4b8f0f9230a4 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -488,6 +488,11 @@ static int __init printk_time_setup(char *str)
488 488
489__setup("time", printk_time_setup); 489__setup("time", printk_time_setup);
490 490
491__attribute__((weak)) unsigned long long printk_clock(void)
492{
493 return sched_clock();
494}
495
491/* 496/*
492 * This is printk. It can be called from any context. We want it to work. 497 * This is printk. It can be called from any context. We want it to work.
493 * 498 *
@@ -565,7 +570,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
565 loglev_char = default_message_loglevel 570 loglev_char = default_message_loglevel
566 + '0'; 571 + '0';
567 } 572 }
568 t = sched_clock(); 573 t = printk_clock();
569 nanosec_rem = do_div(t, 1000000000); 574 nanosec_rem = do_div(t, 1000000000);
570 tlen = sprintf(tbuf, 575 tlen = sprintf(tbuf,
571 "<%c>[%5lu.%06lu] ", 576 "<%c>[%5lu.%06lu] ",
diff --git a/kernel/sys.c b/kernel/sys.c
index c80412be2302..f723522e6986 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) {