aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-09-15 02:24:53 -0400
committerIngo Molnar <mingo@kernel.org>2016-09-15 02:24:53 -0400
commitd4b80afbba49e968623330f1336da8c724da8aad (patch)
treea9478bd77d8b001a6a7119328d34e9666d7bfe93 /kernel
parentfcd709ef20a9d83bdb7524d27cd6719dac8690a0 (diff)
parent4cea8776571b18db7485930cb422faa739580c8c (diff)
Merge branch 'linus' into x86/asm, to pick up recent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit_watch.c8
-rw-r--r--kernel/configs/tiny.config8
-rw-r--r--kernel/cpuset.c15
-rw-r--r--kernel/events/core.c49
-rw-r--r--kernel/events/ring_buffer.c15
-rw-r--r--kernel/exit.c7
-rw-r--r--kernel/fork.c37
-rw-r--r--kernel/irq/affinity.c2
-rw-r--r--kernel/irq/chip.c11
-rw-r--r--kernel/irq/manage.c8
-rw-r--r--kernel/kexec_file.c3
-rw-r--r--kernel/memremap.c9
-rw-r--r--kernel/power/qos.c11
-rw-r--r--kernel/printk/braille.c4
-rw-r--r--kernel/printk/nmi.c38
-rw-r--r--kernel/sched/core.c22
-rw-r--r--kernel/seccomp.c12
-rw-r--r--kernel/sysctl.c45
-rw-r--r--kernel/time/tick-sched.c3
-rw-r--r--kernel/time/timekeeping.c5
-rw-r--r--kernel/time/timekeeping_debug.c9
-rw-r--r--kernel/trace/blktrace.c2
22 files changed, 260 insertions, 63 deletions
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index d6709eb70970..0d302a87f21b 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -19,6 +19,7 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/file.h>
22#include <linux/kernel.h> 23#include <linux/kernel.h>
23#include <linux/audit.h> 24#include <linux/audit.h>
24#include <linux/kthread.h> 25#include <linux/kthread.h>
@@ -544,10 +545,11 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
544 unsigned long ino; 545 unsigned long ino;
545 dev_t dev; 546 dev_t dev;
546 547
547 rcu_read_lock(); 548 exe_file = get_task_exe_file(tsk);
548 exe_file = rcu_dereference(tsk->mm->exe_file); 549 if (!exe_file)
550 return 0;
549 ino = exe_file->f_inode->i_ino; 551 ino = exe_file->f_inode->i_ino;
550 dev = exe_file->f_inode->i_sb->s_dev; 552 dev = exe_file->f_inode->i_sb->s_dev;
551 rcu_read_unlock(); 553 fput(exe_file);
552 return audit_mark_compare(mark, ino, dev); 554 return audit_mark_compare(mark, ino, dev);
553} 555}
diff --git a/kernel/configs/tiny.config b/kernel/configs/tiny.config
index c2de56ab0fce..7fa0c4ae6394 100644
--- a/kernel/configs/tiny.config
+++ b/kernel/configs/tiny.config
@@ -1,4 +1,12 @@
1# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
1CONFIG_CC_OPTIMIZE_FOR_SIZE=y 2CONFIG_CC_OPTIMIZE_FOR_SIZE=y
3# CONFIG_KERNEL_GZIP is not set
4# CONFIG_KERNEL_BZIP2 is not set
5# CONFIG_KERNEL_LZMA is not set
2CONFIG_KERNEL_XZ=y 6CONFIG_KERNEL_XZ=y
7# CONFIG_KERNEL_LZO is not set
8# CONFIG_KERNEL_LZ4 is not set
3CONFIG_OPTIMIZE_INLINING=y 9CONFIG_OPTIMIZE_INLINING=y
10# CONFIG_SLAB is not set
11# CONFIG_SLUB is not set
4CONFIG_SLOB=y 12CONFIG_SLOB=y
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index c7fd2778ed50..c27e53326bef 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2069,6 +2069,20 @@ static void cpuset_bind(struct cgroup_subsys_state *root_css)
2069 mutex_unlock(&cpuset_mutex); 2069 mutex_unlock(&cpuset_mutex);
2070} 2070}
2071 2071
2072/*
2073 * Make sure the new task conform to the current state of its parent,
2074 * which could have been changed by cpuset just after it inherits the
2075 * state from the parent and before it sits on the cgroup's task list.
2076 */
2077void cpuset_fork(struct task_struct *task)
2078{
2079 if (task_css_is_root(task, cpuset_cgrp_id))
2080 return;
2081
2082 set_cpus_allowed_ptr(task, &current->cpus_allowed);
2083 task->mems_allowed = current->mems_allowed;
2084}
2085
2072struct cgroup_subsys cpuset_cgrp_subsys = { 2086struct cgroup_subsys cpuset_cgrp_subsys = {
2073 .css_alloc = cpuset_css_alloc, 2087 .css_alloc = cpuset_css_alloc,
2074 .css_online = cpuset_css_online, 2088 .css_online = cpuset_css_online,
@@ -2079,6 +2093,7 @@ struct cgroup_subsys cpuset_cgrp_subsys = {
2079 .attach = cpuset_attach, 2093 .attach = cpuset_attach,
2080 .post_attach = cpuset_post_attach, 2094 .post_attach = cpuset_post_attach,
2081 .bind = cpuset_bind, 2095 .bind = cpuset_bind,
2096 .fork = cpuset_fork,
2082 .legacy_cftypes = files, 2097 .legacy_cftypes = files,
2083 .early_init = true, 2098 .early_init = true,
2084}; 2099};
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 5650f5317e0c..a54f2c2cdb20 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2496,11 +2496,11 @@ static int __perf_event_stop(void *info)
2496 return 0; 2496 return 0;
2497} 2497}
2498 2498
2499static int perf_event_restart(struct perf_event *event) 2499static int perf_event_stop(struct perf_event *event, int restart)
2500{ 2500{
2501 struct stop_event_data sd = { 2501 struct stop_event_data sd = {
2502 .event = event, 2502 .event = event,
2503 .restart = 1, 2503 .restart = restart,
2504 }; 2504 };
2505 int ret = 0; 2505 int ret = 0;
2506 2506
@@ -3549,10 +3549,18 @@ static int perf_event_read(struct perf_event *event, bool group)
3549 .group = group, 3549 .group = group,
3550 .ret = 0, 3550 .ret = 0,
3551 }; 3551 };
3552 ret = smp_call_function_single(event->oncpu, __perf_event_read, &data, 1); 3552 /*
3553 /* The event must have been read from an online CPU: */ 3553 * Purposely ignore the smp_call_function_single() return
3554 WARN_ON_ONCE(ret); 3554 * value.
3555 ret = ret ? : data.ret; 3555 *
3556 * If event->oncpu isn't a valid CPU it means the event got
3557 * scheduled out and that will have updated the event count.
3558 *
3559 * Therefore, either way, we'll have an up-to-date event count
3560 * after this.
3561 */
3562 (void)smp_call_function_single(event->oncpu, __perf_event_read, &data, 1);
3563 ret = data.ret;
3556 } else if (event->state == PERF_EVENT_STATE_INACTIVE) { 3564 } else if (event->state == PERF_EVENT_STATE_INACTIVE) {
3557 struct perf_event_context *ctx = event->ctx; 3565 struct perf_event_context *ctx = event->ctx;
3558 unsigned long flags; 3566 unsigned long flags;
@@ -4837,6 +4845,19 @@ static void ring_buffer_attach(struct perf_event *event,
4837 spin_unlock_irqrestore(&rb->event_lock, flags); 4845 spin_unlock_irqrestore(&rb->event_lock, flags);
4838 } 4846 }
4839 4847
4848 /*
4849 * Avoid racing with perf_mmap_close(AUX): stop the event
4850 * before swizzling the event::rb pointer; if it's getting
4851 * unmapped, its aux_mmap_count will be 0 and it won't
4852 * restart. See the comment in __perf_pmu_output_stop().
4853 *
4854 * Data will inevitably be lost when set_output is done in
4855 * mid-air, but then again, whoever does it like this is
4856 * not in for the data anyway.
4857 */
4858 if (has_aux(event))
4859 perf_event_stop(event, 0);
4860
4840 rcu_assign_pointer(event->rb, rb); 4861 rcu_assign_pointer(event->rb, rb);
4841 4862
4842 if (old_rb) { 4863 if (old_rb) {
@@ -6112,7 +6133,7 @@ static void perf_event_addr_filters_exec(struct perf_event *event, void *data)
6112 raw_spin_unlock_irqrestore(&ifh->lock, flags); 6133 raw_spin_unlock_irqrestore(&ifh->lock, flags);
6113 6134
6114 if (restart) 6135 if (restart)
6115 perf_event_restart(event); 6136 perf_event_stop(event, 1);
6116} 6137}
6117 6138
6118void perf_event_exec(void) 6139void perf_event_exec(void)
@@ -6156,7 +6177,13 @@ static void __perf_event_output_stop(struct perf_event *event, void *data)
6156 6177
6157 /* 6178 /*
6158 * In case of inheritance, it will be the parent that links to the 6179 * In case of inheritance, it will be the parent that links to the
6159 * ring-buffer, but it will be the child that's actually using it: 6180 * ring-buffer, but it will be the child that's actually using it.
6181 *
6182 * We are using event::rb to determine if the event should be stopped,
6183 * however this may race with ring_buffer_attach() (through set_output),
6184 * which will make us skip the event that actually needs to be stopped.
6185 * So ring_buffer_attach() has to stop an aux event before re-assigning
6186 * its rb pointer.
6160 */ 6187 */
6161 if (rcu_dereference(parent->rb) == rb) 6188 if (rcu_dereference(parent->rb) == rb)
6162 ro->err = __perf_event_stop(&sd); 6189