diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/acct.c | 2 | ||||
-rw-r--r-- | kernel/module.c | 8 | ||||
-rw-r--r-- | kernel/sched_debug.c | 2 | ||||
-rw-r--r-- | kernel/sched_fair.c | 12 | ||||
-rw-r--r-- | kernel/sysctl_check.c | 14 | ||||
-rw-r--r-- | kernel/time/ntp.c | 9 | ||||
-rw-r--r-- | kernel/user.c | 7 |
7 files changed, 25 insertions, 29 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index fce53d8df8a7..cf19547cc9e4 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -413,7 +413,7 @@ static u32 encode_float(u64 value) | |||
413 | * The acct_process() call is the workhorse of the process | 413 | * The acct_process() call is the workhorse of the process |
414 | * accounting system. The struct acct is built here and then written | 414 | * accounting system. The struct acct is built here and then written |
415 | * into the accounting file. This function should only be called from | 415 | * into the accounting file. This function should only be called from |
416 | * do_exit(). | 416 | * do_exit() or when switching to a different output file. |
417 | */ | 417 | */ |
418 | 418 | ||
419 | /* | 419 | /* |
diff --git a/kernel/module.c b/kernel/module.c index 3202c9950073..91fe6958b6e1 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -81,7 +81,8 @@ int unregister_module_notifier(struct notifier_block * nb) | |||
81 | } | 81 | } |
82 | EXPORT_SYMBOL(unregister_module_notifier); | 82 | EXPORT_SYMBOL(unregister_module_notifier); |
83 | 83 | ||
84 | /* We require a truly strong try_module_get() */ | 84 | /* We require a truly strong try_module_get(): 0 means failure due to |
85 | ongoing or failed initialization etc. */ | ||
85 | static inline int strong_try_module_get(struct module *mod) | 86 | static inline int strong_try_module_get(struct module *mod) |
86 | { | 87 | { |
87 | if (mod && mod->state == MODULE_STATE_COMING) | 88 | if (mod && mod->state == MODULE_STATE_COMING) |
@@ -952,7 +953,8 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, | |||
952 | ret = __find_symbol(name, &owner, &crc, | 953 | ret = __find_symbol(name, &owner, &crc, |
953 | !(mod->taints & TAINT_PROPRIETARY_MODULE)); | 954 | !(mod->taints & TAINT_PROPRIETARY_MODULE)); |
954 | if (ret) { | 955 | if (ret) { |
955 | /* use_module can fail due to OOM, or module unloading */ | 956 | /* use_module can fail due to OOM, |
957 | or module initialization or unloading */ | ||
956 | if (!check_version(sechdrs, versindex, name, mod, crc) || | 958 | if (!check_version(sechdrs, versindex, name, mod, crc) || |
957 | !use_module(mod, owner)) | 959 | !use_module(mod, owner)) |
958 | ret = 0; | 960 | ret = 0; |
@@ -1369,7 +1371,7 @@ dup: | |||
1369 | return ret; | 1371 | return ret; |
1370 | } | 1372 | } |
1371 | 1373 | ||
1372 | /* Change all symbols so that sh_value encodes the pointer directly. */ | 1374 | /* Change all symbols so that st_value encodes the pointer directly. */ |
1373 | static int simplify_symbols(Elf_Shdr *sechdrs, | 1375 | static int simplify_symbols(Elf_Shdr *sechdrs, |
1374 | unsigned int symindex, | 1376 | unsigned int symindex, |
1375 | const char *strtab, | 1377 | const char *strtab, |
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index ca198a797bfa..5d0d623a5465 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -199,7 +199,7 @@ static int sched_debug_show(struct seq_file *m, void *v) | |||
199 | u64 now = ktime_to_ns(ktime_get()); | 199 | u64 now = ktime_to_ns(ktime_get()); |
200 | int cpu; | 200 | int cpu; |
201 | 201 | ||
202 | SEQ_printf(m, "Sched Debug Version: v0.06-v22, %s %.*s\n", | 202 | SEQ_printf(m, "Sched Debug Version: v0.07, %s %.*s\n", |
203 | init_utsname()->release, | 203 | init_utsname()->release, |
204 | (int)strcspn(init_utsname()->version, " "), | 204 | (int)strcspn(init_utsname()->version, " "), |
205 | init_utsname()->version); | 205 | init_utsname()->version); |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index ee00da284b12..2f16e15c022c 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | /* | 23 | /* |
24 | * Targeted preemption latency for CPU-bound tasks: | 24 | * Targeted preemption latency for CPU-bound tasks: |
25 | * (default: 20ms * ilog(ncpus), units: nanoseconds) | 25 | * (default: 20ms * (1 + ilog(ncpus)), units: nanoseconds) |
26 | * | 26 | * |
27 | * NOTE: this latency value is not the same as the concept of | 27 | * NOTE: this latency value is not the same as the concept of |
28 | * 'timeslice length' - timeslices in CFS are of variable length | 28 | * 'timeslice length' - timeslices in CFS are of variable length |
@@ -36,14 +36,14 @@ unsigned int sysctl_sched_latency = 20000000ULL; | |||
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Minimal preemption granularity for CPU-bound tasks: | 38 | * Minimal preemption granularity for CPU-bound tasks: |
39 | * (default: 1 msec * ilog(ncpus), units: nanoseconds) | 39 | * (default: 4 msec * (1 + ilog(ncpus)), units: nanoseconds) |
40 | */ | 40 | */ |
41 | unsigned int sysctl_sched_min_granularity = 1000000ULL; | 41 | unsigned int sysctl_sched_min_granularity = 4000000ULL; |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * is kept at sysctl_sched_latency / sysctl_sched_min_granularity | 44 | * is kept at sysctl_sched_latency / sysctl_sched_min_granularity |
45 | */ | 45 | */ |
46 | static unsigned int sched_nr_latency = 20; | 46 | static unsigned int sched_nr_latency = 5; |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * After fork, child runs first. (default) If set to 0 then | 49 | * After fork, child runs first. (default) If set to 0 then |
@@ -61,7 +61,7 @@ unsigned int __read_mostly sysctl_sched_compat_yield; | |||
61 | 61 | ||
62 | /* | 62 | /* |
63 | * SCHED_BATCH wake-up granularity. | 63 | * SCHED_BATCH wake-up granularity. |
64 | * (default: 10 msec * ilog(ncpus), units: nanoseconds) | 64 | * (default: 10 msec * (1 + ilog(ncpus)), units: nanoseconds) |
65 | * | 65 | * |
66 | * This option delays the preemption effects of decoupled workloads | 66 | * This option delays the preemption effects of decoupled workloads |
67 | * and reduces their over-scheduling. Synchronous workloads will still | 67 | * and reduces their over-scheduling. Synchronous workloads will still |
@@ -71,7 +71,7 @@ unsigned int sysctl_sched_batch_wakeup_granularity = 10000000UL; | |||
71 | 71 | ||
72 | /* | 72 | /* |
73 | * SCHED_OTHER wake-up granularity. | 73 | * SCHED_OTHER wake-up granularity. |
74 | * (default: 10 msec * ilog(ncpus), units: nanoseconds) | 74 | * (default: 10 msec * (1 + ilog(ncpus)), units: nanoseconds) |
75 | * | 75 | * |
76 | * This option delays the preemption effects of decoupled workloads | 76 | * This option delays the preemption effects of decoupled workloads |
77 | * and reduces their over-scheduling. Synchronous workloads will still | 77 | * and reduces their over-scheduling. Synchronous workloads will still |
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index fdfca0dd9905..6972f26c65f7 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c | |||
@@ -140,9 +140,6 @@ static struct trans_ctl_table trans_vm_table[] = { | |||
140 | { VM_PANIC_ON_OOM, "panic_on_oom" }, | 140 | { VM_PANIC_ON_OOM, "panic_on_oom" }, |
141 | { VM_VDSO_ENABLED, "vdso_enabled" }, | 141 | { VM_VDSO_ENABLED, "vdso_enabled" }, |
142 | { VM_MIN_SLAB, "min_slab_ratio" }, | 142 | { VM_MIN_SLAB, "min_slab_ratio" }, |
143 | { VM_CMM_PAGES, "cmm_pages" }, | ||
144 | { VM_CMM_TIMED_PAGES, "cmm_timed_pages" }, | ||
145 | { VM_CMM_TIMEOUT, "cmm_timeout" }, | ||
146 | 143 | ||
147 | {} | 144 | {} |
148 | }; | 145 | }; |
@@ -1188,16 +1185,6 @@ static struct trans_ctl_table trans_arlan_table[] = { | |||
1188 | {} | 1185 | {} |
1189 | }; | 1186 | }; |
1190 | 1187 | ||
1191 | static struct trans_ctl_table trans_appldata_table[] = { | ||
1192 | { CTL_APPLDATA_TIMER, "timer" }, | ||
1193 | { CTL_APPLDATA_INTERVAL, "interval" }, | ||
1194 | { CTL_APPLDATA_OS, "os" }, | ||
1195 | { CTL_APPLDATA_NET_SUM, "net_sum" }, | ||
1196 | { CTL_APPLDATA_MEM, "mem" }, | ||
1197 | {} | ||
1198 | |||
1199 | }; | ||
1200 | |||
1201 | static struct trans_ctl_table trans_s390dbf_table[] = { | 1188 | static struct trans_ctl_table trans_s390dbf_table[] = { |
1202 | { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" }, | 1189 | { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" }, |
1203 | { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" }, | 1190 | { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" }, |
@@ -1242,7 +1229,6 @@ static struct trans_ctl_table trans_root_table[] = { | |||
1242 | { CTL_ABI, "abi" }, | 1229 | { CTL_ABI, "abi" }, |
1243 | /* CTL_CPU not used */ | 1230 | /* CTL_CPU not used */ |
1244 | { CTL_ARLAN, "arlan", trans_arlan_table }, | 1231 | { CTL_ARLAN, "arlan", trans_arlan_table }, |
1245 | { CTL_APPLDATA, "appldata", trans_appldata_table }, | ||
1246 | { CTL_S390DBF, "s390dbf", trans_s390dbf_table }, | 1232 | { CTL_S390DBF, "s390dbf", trans_s390dbf_table }, |
1247 | { CTL_SUNRPC, "sunrpc", trans_sunrpc_table }, | 1233 | { CTL_SUNRPC, "sunrpc", trans_sunrpc_table }, |
1248 | { CTL_PM, "pm", trans_pm_table }, | 1234 | { CTL_PM, "pm", trans_pm_table }, |
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 14a2ecf2b318..e64efaf957e8 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -249,10 +249,12 @@ int do_adjtimex(struct timex *txc) | |||
249 | 249 | ||
250 | /* Now we validate the data before disabling interrupts */ | 250 | /* Now we validate the data before disabling interrupts */ |
251 | 251 | ||
252 | if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) | 252 | if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) { |
253 | /* singleshot must not be used with any other mode bits */ | 253 | /* singleshot must not be used with any other mode bits */ |
254 | if (txc->modes != ADJ_OFFSET_SINGLESHOT) | 254 | if (txc->modes != ADJ_OFFSET_SINGLESHOT && |
255 | txc->modes != ADJ_OFFSET_SS_READ) | ||
255 | return -EINVAL; | 256 | return -EINVAL; |
257 | } | ||
256 | 258 | ||
257 | if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET)) | 259 | if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET)) |
258 | /* adjustment Offset limited to +- .512 seconds */ | 260 | /* adjustment Offset limited to +- .512 seconds */ |
@@ -372,7 +374,8 @@ int do_adjtimex(struct timex *txc) | |||
372 | leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0) | 374 | leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0) |
373 | result = TIME_ERROR; | 375 | result = TIME_ERROR; |
374 | 376 | ||
375 | if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) | 377 | if ((txc->modes == ADJ_OFFSET_SINGLESHOT) || |
378 | (txc->modes == ADJ_OFFSET_SS_READ)) | ||
376 | txc->offset = save_adjust; | 379 | txc->offset = save_adjust; |
377 | else | 380 | else |
378 | txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) * | 381 | txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) * |
diff --git a/kernel/user.c b/kernel/user.c index 0f3aa0234107..8320a87f3e5a 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -337,8 +337,11 @@ struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid) | |||
337 | struct user_struct *new; | 337 | struct user_struct *new; |
338 | 338 | ||
339 | new = kmem_cache_alloc(uid_cachep, GFP_KERNEL); | 339 | new = kmem_cache_alloc(uid_cachep, GFP_KERNEL); |
340 | if (!new) | 340 | if (!new) { |
341 | uids_mutex_unlock(); | ||
341 | return NULL; | 342 | return NULL; |
343 | } | ||
344 | |||
342 | new->uid = uid; | 345 | new->uid = uid; |
343 | atomic_set(&new->__count, 1); | 346 | atomic_set(&new->__count, 1); |
344 | atomic_set(&new->processes, 0); | 347 | atomic_set(&new->processes, 0); |
@@ -355,6 +358,7 @@ struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid) | |||
355 | 358 | ||
356 | if (alloc_uid_keyring(new, current) < 0) { | 359 | if (alloc_uid_keyring(new, current) < 0) { |
357 | kmem_cache_free(uid_cachep, new); | 360 | kmem_cache_free(uid_cachep, new); |
361 | uids_mutex_unlock(); | ||
358 | return NULL; | 362 | return NULL; |
359 | } | 363 | } |
360 | 364 | ||
@@ -362,6 +366,7 @@ struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid) | |||
362 | key_put(new->uid_keyring); | 366 | key_put(new->uid_keyring); |
363 | key_put(new->session_keyring); | 367 | key_put(new->session_keyring); |
364 | kmem_cache_free(uid_cachep, new); | 368 | kmem_cache_free(uid_cachep, new); |
369 | uids_mutex_unlock(); | ||
365 | return NULL; | 370 | return NULL; |
366 | } | 371 | } |
367 | 372 | ||