diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/acct.c | 3 | ||||
-rw-r--r-- | kernel/params.c | 8 | ||||
-rw-r--r-- | kernel/power/console.c | 7 | ||||
-rw-r--r-- | kernel/smp.c | 3 | ||||
-rw-r--r-- | kernel/sys.c | 8 | ||||
-rw-r--r-- | kernel/sysctl.c | 18 |
6 files changed, 28 insertions, 19 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 9a4715a2f6bf..a6605ca921b6 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -536,7 +536,8 @@ static void do_acct_process(struct bsd_acct_struct *acct, | |||
536 | do_div(elapsed, AHZ); | 536 | do_div(elapsed, AHZ); |
537 | ac.ac_btime = get_seconds() - elapsed; | 537 | ac.ac_btime = get_seconds() - elapsed; |
538 | /* we really need to bite the bullet and change layout */ | 538 | /* we really need to bite the bullet and change layout */ |
539 | current_uid_gid(&ac.ac_uid, &ac.ac_gid); | 539 | ac.ac_uid = orig_cred->uid; |
540 | ac.ac_gid = orig_cred->gid; | ||
540 | #if ACCT_VERSION==2 | 541 | #if ACCT_VERSION==2 |
541 | ac.ac_ahz = AHZ; | 542 | ac.ac_ahz = AHZ; |
542 | #endif | 543 | #endif |
diff --git a/kernel/params.c b/kernel/params.c index d656c276508d..cf1b69183127 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/ctype.h> | 26 | #include <linux/ctype.h> |
27 | #include <linux/string.h> | ||
27 | 28 | ||
28 | #if 0 | 29 | #if 0 |
29 | #define DEBUGP printk | 30 | #define DEBUGP printk |
@@ -122,9 +123,7 @@ static char *next_arg(char *args, char **param, char **val) | |||
122 | next = args + i; | 123 | next = args + i; |
123 | 124 | ||
124 | /* Chew up trailing spaces. */ | 125 | /* Chew up trailing spaces. */ |
125 | while (isspace(*next)) | 126 | return skip_spaces(next); |
126 | next++; | ||
127 | return next; | ||
128 | } | 127 | } |
129 | 128 | ||
130 | /* Args looks like "foo=bar,bar2 baz=fuz wiz". */ | 129 | /* Args looks like "foo=bar,bar2 baz=fuz wiz". */ |
@@ -139,8 +138,7 @@ int parse_args(const char *name, | |||
139 | DEBUGP("Parsing ARGS: %s\n", args); | 138 | DEBUGP("Parsing ARGS: %s\n", args); |
140 | 139 | ||
141 | /* Chew leading spaces */ | 140 | /* Chew leading spaces */ |
142 | while (isspace(*args)) | 141 | args = skip_spaces(args); |
143 | args++; | ||
144 | 142 | ||
145 | while (*args) { | 143 | while (*args) { |
146 | int ret; | 144 | int ret; |
diff --git a/kernel/power/console.c b/kernel/power/console.c index 5187136fe1de..218e5af90156 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/vt_kern.h> | 7 | #include <linux/vt_kern.h> |
8 | #include <linux/kbd_kern.h> | 8 | #include <linux/kbd_kern.h> |
9 | #include <linux/console.h> | 9 | #include <linux/vt.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include "power.h" | 11 | #include "power.h" |
12 | 12 | ||
@@ -21,8 +21,7 @@ int pm_prepare_console(void) | |||
21 | if (orig_fgconsole < 0) | 21 | if (orig_fgconsole < 0) |
22 | return 1; | 22 | return 1; |
23 | 23 | ||
24 | orig_kmsg = kmsg_redirect; | 24 | orig_kmsg = vt_kmsg_redirect(SUSPEND_CONSOLE); |
25 | kmsg_redirect = SUSPEND_CONSOLE; | ||
26 | return 0; | 25 | return 0; |
27 | } | 26 | } |
28 | 27 | ||
@@ -30,7 +29,7 @@ void pm_restore_console(void) | |||
30 | { | 29 | { |
31 | if (orig_fgconsole >= 0) { | 30 | if (orig_fgconsole >= 0) { |
32 | vt_move_to_console(orig_fgconsole, 0); | 31 | vt_move_to_console(orig_fgconsole, 0); |
33 | kmsg_redirect = orig_kmsg; | 32 | vt_kmsg_redirect(orig_kmsg); |
34 | } | 33 | } |
35 | } | 34 | } |
36 | #endif | 35 | #endif |
diff --git a/kernel/smp.c b/kernel/smp.c index 6e7c7fdcd9b4..de735a6637d0 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -171,7 +171,7 @@ void generic_exec_single(int cpu, struct call_single_data *data, int wait) | |||
171 | void generic_smp_call_function_interrupt(void) | 171 | void generic_smp_call_function_interrupt(void) |
172 | { | 172 | { |
173 | struct call_function_data *data; | 173 | struct call_function_data *data; |
174 | int cpu = get_cpu(); | 174 | int cpu = smp_processor_id(); |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * Shouldn't receive this interrupt on a cpu that is not yet online. | 177 | * Shouldn't receive this interrupt on a cpu that is not yet online. |
@@ -212,7 +212,6 @@ void generic_smp_call_function_interrupt(void) | |||
212 | csd_unlock(&data->csd); | 212 | csd_unlock(&data->csd); |
213 | } | 213 | } |
214 | 214 | ||
215 | put_cpu(); | ||
216 | } | 215 | } |
217 | 216 | ||
218 | /* | 217 | /* |
diff --git a/kernel/sys.c b/kernel/sys.c index 585d6cd10040..20ccfb5da6af 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -189,10 +189,10 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) | |||
189 | !(user = find_user(who))) | 189 | !(user = find_user(who))) |
190 | goto out_unlock; /* No processes for this user */ | 190 | goto out_unlock; /* No processes for this user */ |
191 | 191 | ||
192 | do_each_thread(g, p) | 192 | do_each_thread(g, p) { |
193 | if (__task_cred(p)->uid == who) | 193 | if (__task_cred(p)->uid == who) |
194 | error = set_one_prio(p, niceval, error); | 194 | error = set_one_prio(p, niceval, error); |
195 | while_each_thread(g, p); | 195 | } while_each_thread(g, p); |
196 | if (who != cred->uid) | 196 | if (who != cred->uid) |
197 | free_uid(user); /* For find_user() */ | 197 | free_uid(user); /* For find_user() */ |
198 | break; | 198 | break; |
@@ -252,13 +252,13 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who) | |||
252 | !(user = find_user(who))) | 252 | !(user = find_user(who))) |
253 | goto out_unlock; /* No processes for this user */ | 253 | goto out_unlock; /* No processes for this user */ |
254 | 254 | ||
255 | do_each_thread(g, p) | 255 | do_each_thread(g, p) { |
256 | if (__task_cred(p)->uid == who) { | 256 | if (__task_cred(p)->uid == who) { |
257 | niceval = 20 - task_nice(p); | 257 | niceval = 20 - task_nice(p); |
258 | if (niceval > retval) | 258 | if (niceval > retval) |
259 | retval = niceval; | 259 | retval = niceval; |
260 | } | 260 | } |
261 | while_each_thread(g, p); | 261 | } while_each_thread(g, p); |
262 | if (who != cred->uid) | 262 | if (who != cred->uid) |
263 | free_uid(user); /* for find_user() */ | 263 | free_uid(user); /* for find_user() */ |
264 | break; | 264 | break; |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 554ac4894f0f..45e4bef0012a 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1051,7 +1051,7 @@ static struct ctl_table vm_table[] = { | |||
1051 | .extra2 = &one_hundred, | 1051 | .extra2 = &one_hundred, |
1052 | }, | 1052 | }, |
1053 | #ifdef CONFIG_HUGETLB_PAGE | 1053 | #ifdef CONFIG_HUGETLB_PAGE |
1054 | { | 1054 | { |
1055 | .procname = "nr_hugepages", | 1055 | .procname = "nr_hugepages", |
1056 | .data = NULL, | 1056 | .data = NULL, |
1057 | .maxlen = sizeof(unsigned long), | 1057 | .maxlen = sizeof(unsigned long), |
@@ -1059,7 +1059,18 @@ static struct ctl_table vm_table[] = { | |||
1059 | .proc_handler = hugetlb_sysctl_handler, | 1059 | .proc_handler = hugetlb_sysctl_handler, |
1060 | .extra1 = (void *)&hugetlb_zero, | 1060 | .extra1 = (void *)&hugetlb_zero, |
1061 | .extra2 = (void *)&hugetlb_infinity, | 1061 | .extra2 = (void *)&hugetlb_infinity, |
1062 | }, | 1062 | }, |
1063 | #ifdef CONFIG_NUMA | ||
1064 | { | ||
1065 | .procname = "nr_hugepages_mempolicy", | ||
1066 | .data = NULL, | ||
1067 | .maxlen = sizeof(unsigned long), | ||
1068 | .mode = 0644, | ||
1069 | .proc_handler = &hugetlb_mempolicy_sysctl_handler, | ||
1070 | .extra1 = (void *)&hugetlb_zero, | ||
1071 | .extra2 = (void *)&hugetlb_infinity, | ||
1072 | }, | ||
1073 | #endif | ||
1063 | { | 1074 | { |
1064 | .procname = "hugetlb_shm_group", | 1075 | .procname = "hugetlb_shm_group", |
1065 | .data = &sysctl_hugetlb_shm_group, | 1076 | .data = &sysctl_hugetlb_shm_group, |
@@ -1120,7 +1131,8 @@ static struct ctl_table vm_table[] = { | |||
1120 | .data = &sysctl_max_map_count, | 1131 | .data = &sysctl_max_map_count, |
1121 | .maxlen = sizeof(sysctl_max_map_count), | 1132 | .maxlen = sizeof(sysctl_max_map_count), |
1122 | .mode = 0644, | 1133 | .mode = 0644, |
1123 | .proc_handler = proc_dointvec | 1134 | .proc_handler = proc_dointvec, |
1135 | .extra1 = &zero, | ||
1124 | }, | 1136 | }, |
1125 | #else | 1137 | #else |
1126 | { | 1138 | { |