diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 23:58:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 23:58:12 -0500 |
commit | 848b81415c42ff3dc9a4204749087b015c37ef66 (patch) | |
tree | 391da3a73aea48632248220d2d6b8d45a88f7eae /kernel | |
parent | 992956189de58cae9f2be40585bc25105cd7c5ad (diff) | |
parent | 6fd59a83b9261fa53eaf98fb5514abba504a3ea3 (diff) |
Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc patches from Andrew Morton:
"Incoming:
- lots of misc stuff
- backlight tree updates
- lib/ updates
- Oleg's percpu-rwsem changes
- checkpatch
- rtc
- aoe
- more checkpoint/restart support
I still have a pile of MM stuff pending - Pekka should be merging
later today after which that is good to go. A number of other things
are twiddling thumbs awaiting maintainer merges."
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (180 commits)
scatterlist: don't BUG when we can trivially return a proper error.
docs: update documentation about /proc/<pid>/fdinfo/<fd> fanotify output
fs, fanotify: add @mflags field to fanotify output
docs: add documentation about /proc/<pid>/fdinfo/<fd> output
fs, notify: add procfs fdinfo helper
fs, exportfs: add exportfs_encode_inode_fh() helper
fs, exportfs: escape nil dereference if no s_export_op present
fs, epoll: add procfs fdinfo helper
fs, eventfd: add procfs fdinfo helper
procfs: add ability to plug in auxiliary fdinfo providers
tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test
breakpoint selftests: print failure status instead of cause make error
kcmp selftests: print fail status instead of cause make error
kcmp selftests: make run_tests fix
mem-hotplug selftests: print failure status instead of cause make error
cpu-hotplug selftests: print failure status instead of cause make error
mqueue selftests: print failure status instead of cause make error
vm selftests: print failure status instead of cause make error
ubifs: use prandom_bytes
mtd: nandsim: use prandom_bytes
...
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup.c | 1 | ||||
-rw-r--r-- | kernel/compat.c | 17 | ||||
-rw-r--r-- | kernel/module.c | 3 | ||||
-rw-r--r-- | kernel/pid.c | 15 | ||||
-rw-r--r-- | kernel/printk.c | 40 | ||||
-rw-r--r-- | kernel/ptrace.c | 3 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 4 | ||||
-rw-r--r-- | kernel/trace/trace_uprobe.c | 8 | ||||
-rw-r--r-- | kernel/watchdog.c | 13 |
9 files changed, 55 insertions, 49 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 9915ffe01372..4855892798fd 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -1333,7 +1333,6 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data) | |||
1333 | if (ret) | 1333 | if (ret) |
1334 | goto out_unlock; | 1334 | goto out_unlock; |
1335 | 1335 | ||
1336 | /* See feature-removal-schedule.txt */ | ||
1337 | if (opts.subsys_mask != root->actual_subsys_mask || opts.release_agent) | 1336 | if (opts.subsys_mask != root->actual_subsys_mask || opts.release_agent) |
1338 | pr_warning("cgroup: option changes via remount are deprecated (pid=%d comm=%s)\n", | 1337 | pr_warning("cgroup: option changes via remount are deprecated (pid=%d comm=%s)\n", |
1339 | task_tgid_nr(current), current->comm); | 1338 | task_tgid_nr(current), current->comm); |
diff --git a/kernel/compat.c b/kernel/compat.c index c28a306ae05c..f6150e92dfc9 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -1215,6 +1215,23 @@ compat_sys_sysinfo(struct compat_sysinfo __user *info) | |||
1215 | return 0; | 1215 | return 0; |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | #ifdef __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL | ||
1219 | asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, | ||
1220 | struct compat_timespec __user *interval) | ||
1221 | { | ||
1222 | struct timespec t; | ||
1223 | int ret; | ||
1224 | mm_segment_t old_fs = get_fs(); | ||
1225 | |||
1226 | set_fs(KERNEL_DS); | ||
1227 | ret = sys_sched_rr_get_interval(pid, (struct timespec __user *)&t); | ||
1228 | set_fs(old_fs); | ||
1229 | if (put_compat_timespec(&t, interval)) | ||
1230 | return -EFAULT; | ||
1231 | return ret; | ||
1232 | } | ||
1233 | #endif /* __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL */ | ||
1234 | |||
1218 | /* | 1235 | /* |
1219 | * Allocate user-space memory for the duration of a single system call, | 1236 | * Allocate user-space memory for the duration of a single system call, |
1220 | * in order to marshall parameters inside a compat thunk. | 1237 | * in order to marshall parameters inside a compat thunk. |
diff --git a/kernel/module.c b/kernel/module.c index 6e48c3a43599..808bd62e1723 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -372,9 +372,6 @@ static bool check_symbol(const struct symsearch *syms, | |||
372 | printk(KERN_WARNING "Symbol %s is being used " | 372 | printk(KERN_WARNING "Symbol %s is being used " |
373 | "by a non-GPL module, which will not " | 373 | "by a non-GPL module, which will not " |
374 | "be allowed in the future\n", fsa->name); | 374 | "be allowed in the future\n", fsa->name); |
375 | printk(KERN_WARNING "Please see the file " | ||
376 | "Documentation/feature-removal-schedule.txt " | ||
377 | "in the kernel source tree for more details.\n"); | ||
378 | } | 375 | } |
379 | } | 376 | } |
380 | 377 | ||
diff --git a/kernel/pid.c b/kernel/pid.c index 3e2cf8100acc..36aa02ff17d6 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
@@ -84,21 +84,6 @@ struct pid_namespace init_pid_ns = { | |||
84 | }; | 84 | }; |
85 | EXPORT_SYMBOL_GPL(init_pid_ns); | 85 | EXPORT_SYMBOL_GPL(init_pid_ns); |
86 | 86 | ||
87 | int is_container_init(struct task_struct *tsk) | ||
88 | { | ||
89 | int ret = 0; | ||
90 | struct pid *pid; | ||
91 | |||
92 | rcu_read_lock(); | ||
93 | pid = task_pid(tsk); | ||
94 | if (pid != NULL && pid->numbers[pid->level].nr == 1) | ||
95 | ret = 1; | ||
96 | rcu_read_unlock(); | ||
97 | |||
98 | return ret; | ||
99 | } | ||
100 | EXPORT_SYMBOL(is_container_init); | ||
101 | |||
102 | /* | 87 | /* |
103 | * Note: disable interrupts while the pidmap_lock is held as an | 88 | * Note: disable interrupts while the pidmap_lock is held as an |
104 | * interrupt might come in and do read_lock(&tasklist_lock). | 89 | * interrupt might come in and do read_lock(&tasklist_lock). |
diff --git a/kernel/printk.c b/kernel/printk.c index 22e070f3470a..19c0d7bcf24a 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -747,6 +747,21 @@ void __init setup_log_buf(int early) | |||
747 | free, (free * 100) / __LOG_BUF_LEN); | 747 | free, (free * 100) / __LOG_BUF_LEN); |
748 | } | 748 | } |
749 | 749 | ||
750 | static bool __read_mostly ignore_loglevel; | ||
751 | |||
752 | static int __init ignore_loglevel_setup(char *str) | ||
753 | { | ||
754 | ignore_loglevel = 1; | ||
755 | printk(KERN_INFO "debug: ignoring loglevel setting.\n"); | ||
756 | |||
757 | return 0; | ||
758 | } | ||
759 | |||
760 | early_param("ignore_loglevel", ignore_loglevel_setup); | ||
761 | module_param(ignore_loglevel, bool, S_IRUGO | S_IWUSR); | ||
762 | MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to" | ||
763 | "print all kernel messages to the console."); | ||
764 | |||
750 | #ifdef CONFIG_BOOT_PRINTK_DELAY | 765 | #ifdef CONFIG_BOOT_PRINTK_DELAY |
751 | 766 | ||
752 | static int boot_delay; /* msecs delay after each printk during bootup */ | 767 | static int boot_delay; /* msecs delay after each printk during bootup */ |
@@ -770,13 +785,15 @@ static int __init boot_delay_setup(char *str) | |||
770 | } | 785 | } |
771 | __setup("boot_delay=", boot_delay_setup); | 786 | __setup("boot_delay=", boot_delay_setup); |
772 | 787 | ||
773 | static void boot_delay_msec(void) | 788 | static void boot_delay_msec(int level) |
774 | { | 789 | { |
775 | unsigned long long k; | 790 | unsigned long long k; |
776 | unsigned long timeout; | 791 | unsigned long timeout; |
777 | 792 | ||
778 | if (boot_delay == 0 || system_state != SYSTEM_BOOTING) | 793 | if ((boot_delay == 0 || system_state != SYSTEM_BOOTING) |
794 | || (level >= console_loglevel && !ignore_loglevel)) { | ||
779 | return; | 795 | return; |
796 | } | ||
780 | 797 | ||
781 | k = (unsigned long long)loops_per_msec * boot_delay; | 798 | k = (unsigned long long)loops_per_msec * boot_delay; |
782 | 799 | ||
@@ -795,7 +812,7 @@ static void boot_delay_msec(void) | |||
795 | } | 812 | } |
796 | } | 813 | } |
797 | #else | 814 | #else |
798 | static inline void boot_delay_msec(void) | 815 | static inline void boot_delay_msec(int level) |
799 | { | 816 | { |
800 | } | 817 | } |
801 | #endif | 818 | #endif |
@@ -1238,21 +1255,6 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) | |||
1238 | return do_syslog(type, buf, len, SYSLOG_FROM_CALL); | 1255 | return do_syslog(type, buf, len, SYSLOG_FROM_CALL); |
1239 | } | 1256 | } |
1240 | 1257 | ||
1241 | static bool __read_mostly ignore_loglevel; | ||
1242 | |||
1243 | static int __init ignore_loglevel_setup(char *str) | ||
1244 | { | ||
1245 | ignore_loglevel = 1; | ||
1246 | printk(KERN_INFO "debug: ignoring loglevel setting.\n"); | ||
1247 | |||
1248 | return 0; | ||
1249 | } | ||
1250 | |||
1251 | early_param("ignore_loglevel", ignore_loglevel_setup); | ||
1252 | module_param(ignore_loglevel, bool, S_IRUGO | S_IWUSR); | ||
1253 | MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to" | ||
1254 | "print all kernel messages to the console."); | ||
1255 | |||
1256 | /* | 1258 | /* |
1257 | * Call the console drivers, asking them to write out | 1259 | * Call the console drivers, asking them to write out |
1258 | * log_buf[start] to log_buf[end - 1]. | 1260 | * log_buf[start] to log_buf[end - 1]. |
@@ -1498,7 +1500,7 @@ asmlinkage int vprintk_emit(int facility, int level, | |||
1498 | int this_cpu; | 1500 | int this_cpu; |
1499 | int printed_len = 0; | 1501 | int printed_len = 0; |
1500 | 1502 | ||
1501 | boot_delay_msec(); | 1503 | boot_delay_msec(level); |
1502 | printk_delay(); | 1504 | printk_delay(); |
1503 | 1505 | ||
1504 | /* This stops the holder of console_sem just where we want him */ | 1506 | /* This stops the holder of console_sem just where we want him */ |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 7b09b88862cc..1599157336a6 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -463,6 +463,9 @@ void exit_ptrace(struct task_struct *tracer) | |||
463 | return; | 463 | return; |
464 | 464 | ||
465 | list_for_each_entry_safe(p, n, &tracer->ptraced, ptrace_entry) { | 465 | list_for_each_entry_safe(p, n, &tracer->ptraced, ptrace_entry) { |
466 | if (unlikely(p->ptrace & PT_EXITKILL)) | ||
467 | send_sig_info(SIGKILL, SEND_SIG_FORCED, p); | ||
468 | |||
466 | if (__ptrace_detach(tracer, p)) | 469 | if (__ptrace_detach(tracer, p)) |
467 | list_add(&p->ptrace_entry, &ptrace_dead); | 470 | list_add(&p->ptrace_entry, &ptrace_dead); |
468 | } | 471 | } |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index afd092de45b7..3ffe4c5ad3f3 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2675,12 +2675,12 @@ ftrace_notrace_open(struct inode *inode, struct file *file) | |||
2675 | } | 2675 | } |
2676 | 2676 | ||
2677 | loff_t | 2677 | loff_t |
2678 | ftrace_regex_lseek(struct file *file, loff_t offset, int origin) | 2678 | ftrace_regex_lseek(struct file *file, loff_t offset, int whence) |
2679 | { | 2679 | { |
2680 | loff_t ret; | 2680 | loff_t ret; |
2681 | 2681 | ||
2682 | if (file->f_mode & FMODE_READ) | 2682 | if (file->f_mode & FMODE_READ) |
2683 | ret = seq_lseek(file, offset, origin); | 2683 | ret = seq_lseek(file, offset, whence); |
2684 | else | 2684 | else |
2685 | file->f_pos = ret = 1; | 2685 | file->f_pos = ret = 1; |
2686 | 2686 | ||
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 9614db8b0f8c..c86e6d4f67fb 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
23 | #include <linux/uprobes.h> | 23 | #include <linux/uprobes.h> |
24 | #include <linux/namei.h> | 24 | #include <linux/namei.h> |
25 | #include <linux/string.h> | ||
25 | 26 | ||
26 | #include "trace_probe.h" | 27 | #include "trace_probe.h" |
27 | 28 | ||
@@ -263,16 +264,15 @@ static int create_trace_uprobe(int argc, char **argv) | |||
263 | 264 | ||
264 | /* setup a probe */ | 265 | /* setup a probe */ |
265 | if (!event) { | 266 | if (!event) { |
266 | char *tail = strrchr(filename, '/'); | 267 | char *tail; |
267 | char *ptr; | 268 | char *ptr; |
268 | 269 | ||
269 | ptr = kstrdup((tail ? tail + 1 : filename), GFP_KERNEL); | 270 | tail = kstrdup(kbasename(filename), GFP_KERNEL); |
270 | if (!ptr) { | 271 | if (!tail) { |
271 | ret = -ENOMEM; | 272 | ret = -ENOMEM; |
272 | goto fail_address_parse; | 273 | goto fail_address_parse; |
273 | } | 274 | } |
274 | 275 | ||
275 | tail = ptr; | ||
276 | ptr = strpbrk(tail, ".-_"); | 276 | ptr = strpbrk(tail, ".-_"); |
277 | if (ptr) | 277 | if (ptr) |
278 | *ptr = '\0'; | 278 | *ptr = '\0'; |
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index c8c21be11ab4..997c6a16ec22 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -31,6 +31,7 @@ | |||
31 | int watchdog_enabled = 1; | 31 | int watchdog_enabled = 1; |
32 | int __read_mostly watchdog_thresh = 10; | 32 | int __read_mostly watchdog_thresh = 10; |
33 | static int __read_mostly watchdog_disabled; | 33 | static int __read_mostly watchdog_disabled; |
34 | static u64 __read_mostly sample_period; | ||
34 | 35 | ||
35 | static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts); | 36 | static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts); |
36 | static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog); | 37 | static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog); |
@@ -116,7 +117,7 @@ static unsigned long get_timestamp(int this_cpu) | |||
116 | return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */ | 117 | return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */ |
117 | } | 118 | } |
118 | 119 | ||
119 | static u64 get_sample_period(void) | 120 | static void set_sample_period(void) |
120 | { | 121 | { |
121 | /* | 122 | /* |
122 | * convert watchdog_thresh from seconds to ns | 123 | * convert watchdog_thresh from seconds to ns |
@@ -125,7 +126,7 @@ static u64 get_sample_period(void) | |||
125 | * and hard thresholds) to increment before the | 126 | * and hard thresholds) to increment before the |
126 | * hardlockup detector generates a warning | 127 | * hardlockup detector generates a warning |
127 | */ | 128 | */ |
128 | return get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5); | 129 | sample_period = get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5); |
129 | } | 130 | } |
130 | 131 | ||
131 | /* Commands for resetting the watchdog */ | 132 | /* Commands for resetting the watchdog */ |
@@ -275,7 +276,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) | |||
275 | wake_up_process(__this_cpu_read(softlockup_watchdog)); | 276 | wake_up_process(__this_cpu_read(softlockup_watchdog)); |
276 | 277 | ||
277 | /* .. and repeat */ | 278 | /* .. and repeat */ |
278 | hrtimer_forward_now(hrtimer, ns_to_ktime(get_sample_period())); | 279 | hrtimer_forward_now(hrtimer, ns_to_ktime(sample_period)); |
279 | 280 | ||
280 | if (touch_ts == 0) { | 281 | if (touch_ts == 0) { |
281 | if (unlikely(__this_cpu_read(softlockup_touch_sync))) { | 282 | if (unlikely(__this_cpu_read(softlockup_touch_sync))) { |
@@ -356,7 +357,7 @@ static void watchdog_enable(unsigned int cpu) | |||
356 | hrtimer->function = watchdog_timer_fn; | 357 | hrtimer->function = watchdog_timer_fn; |
357 | 358 | ||
358 | /* done here because hrtimer_start can only pin to smp_processor_id() */ | 359 | /* done here because hrtimer_start can only pin to smp_processor_id() */ |
359 | hrtimer_start(hrtimer, ns_to_ktime(get_sample_period()), | 360 | hrtimer_start(hrtimer, ns_to_ktime(sample_period), |
360 | HRTIMER_MODE_REL_PINNED); | 361 | HRTIMER_MODE_REL_PINNED); |
361 | 362 | ||
362 | /* initialize timestamp */ | 363 | /* initialize timestamp */ |
@@ -386,7 +387,7 @@ static int watchdog_should_run(unsigned int cpu) | |||
386 | /* | 387 | /* |
387 | * The watchdog thread function - touches the timestamp. | 388 | * The watchdog thread function - touches the timestamp. |
388 | * | 389 | * |
389 | * It only runs once every get_sample_period() seconds (4 seconds by | 390 | * It only runs once every sample_period seconds (4 seconds by |
390 | * default) to reset the softlockup timestamp. If this gets delayed | 391 | * default) to reset the softlockup timestamp. If this gets delayed |
391 | * for more than 2*watchdog_thresh seconds then the debug-printout | 392 | * for more than 2*watchdog_thresh seconds then the debug-printout |
392 | * triggers in watchdog_timer_fn(). | 393 | * triggers in watchdog_timer_fn(). |
@@ -519,6 +520,7 @@ int proc_dowatchdog(struct ctl_table *table, int write, | |||
519 | if (ret || !write) | 520 | if (ret || !write) |
520 | return ret; | 521 | return ret; |
521 | 522 | ||
523 | set_sample_period(); | ||
522 | if (watchdog_enabled && watchdog_thresh) | 524 | if (watchdog_enabled && watchdog_thresh) |
523 | watchdog_enable_all_cpus(); | 525 | watchdog_enable_all_cpus(); |
524 | else | 526 | else |
@@ -540,6 +542,7 @@ static struct smp_hotplug_thread watchdog_threads = { | |||
540 | 542 | ||
541 | void __init lockup_detector_init(void) | 543 | void __init lockup_detector_init(void) |
542 | { | 544 | { |
545 | set_sample_period(); | ||
543 | if (smpboot_register_percpu_thread(&watchdog_threads)) { | 546 | if (smpboot_register_percpu_thread(&watchdog_threads)) { |
544 | pr_err("Failed to create watchdog threads, disabled\n"); | 547 | pr_err("Failed to create watchdog threads, disabled\n"); |
545 | watchdog_disabled = -ENODEV; | 548 | watchdog_disabled = -ENODEV; |