diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/compat.c | 63 | ||||
| -rw-r--r-- | kernel/fork.c | 3 | ||||
| -rw-r--r-- | kernel/irq/chip.c | 1 | ||||
| -rw-r--r-- | kernel/irq/irqdesc.c | 1 | ||||
| -rw-r--r-- | kernel/sched/core.c | 2 | ||||
| -rw-r--r-- | kernel/trace/trace_events.c | 5 | ||||
| -rw-r--r-- | kernel/trace/trace_export.c | 1 |
7 files changed, 58 insertions, 18 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 74ff8498809a..d2c67aa49ae6 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
| @@ -372,25 +372,54 @@ asmlinkage long compat_sys_sigpending(compat_old_sigset_t __user *set) | |||
| 372 | 372 | ||
| 373 | #ifdef __ARCH_WANT_SYS_SIGPROCMASK | 373 | #ifdef __ARCH_WANT_SYS_SIGPROCMASK |
| 374 | 374 | ||
| 375 | asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t __user *set, | 375 | /* |
| 376 | compat_old_sigset_t __user *oset) | 376 | * sys_sigprocmask SIG_SETMASK sets the first (compat) word of the |
| 377 | * blocked set of signals to the supplied signal set | ||
| 378 | */ | ||
| 379 | static inline void compat_sig_setmask(sigset_t *blocked, compat_sigset_word set) | ||
| 377 | { | 380 | { |
| 378 | old_sigset_t s; | 381 | memcpy(blocked->sig, &set, sizeof(set)); |
| 379 | long ret; | 382 | } |
| 380 | mm_segment_t old_fs; | ||
| 381 | 383 | ||
| 382 | if (set && get_user(s, set)) | 384 | asmlinkage long compat_sys_sigprocmask(int how, |
| 383 | return -EFAULT; | 385 | compat_old_sigset_t __user *nset, |
| 384 | old_fs = get_fs(); | 386 | compat_old_sigset_t __user *oset) |
| 385 | set_fs(KERNEL_DS); | 387 | { |
| 386 | ret = sys_sigprocmask(how, | 388 | old_sigset_t old_set, new_set; |
| 387 | set ? (old_sigset_t __user *) &s : NULL, | 389 | sigset_t new_blocked; |
| 388 | oset ? (old_sigset_t __user *) &s : NULL); | 390 | |
| 389 | set_fs(old_fs); | 391 | old_set = current->blocked.sig[0]; |
| 390 | if (ret == 0) | 392 | |
| 391 | if (oset) | 393 | if (nset) { |
| 392 | ret = put_user(s, oset); | 394 | if (get_user(new_set, nset)) |
| 393 | return ret; | 395 | return -EFAULT; |
| 396 | new_set &= ~(sigmask(SIGKILL) | sigmask(SIGSTOP)); | ||
| 397 | |||
| 398 | new_blocked = current->blocked; | ||
| 399 | |||
| 400 | switch (how) { | ||
| 401 | case SIG_BLOCK: | ||
| 402 | sigaddsetmask(&new_blocked, new_set); | ||
| 403 | break; | ||
| 404 | case SIG_UNBLOCK: | ||
| 405 | sigdelsetmask(&new_blocked, new_set); | ||
| 406 | break; | ||
| 407 | case SIG_SETMASK: | ||
| 408 | compat_sig_setmask(&new_blocked, new_set); | ||
| 409 | break; | ||
| 410 | default: | ||
| 411 | return -EINVAL; | ||
| 412 | } | ||
| 413 | |||
| 414 | set_current_blocked(&new_blocked); | ||
| 415 | } | ||
| 416 | |||
| 417 | if (oset) { | ||
| 418 | if (put_user(old_set, oset)) | ||
| 419 | return -EFAULT; | ||
| 420 | } | ||
| 421 | |||
| 422 | return 0; | ||
| 394 | } | 423 | } |
| 395 | 424 | ||
| 396 | #endif | 425 | #endif |
diff --git a/kernel/fork.c b/kernel/fork.c index b9372a0bff18..687a15d56243 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #include <linux/audit.h> | 47 | #include <linux/audit.h> |
| 48 | #include <linux/memcontrol.h> | 48 | #include <linux/memcontrol.h> |
| 49 | #include <linux/ftrace.h> | 49 | #include <linux/ftrace.h> |
| 50 | #include <linux/proc_fs.h> | ||
| 50 | #include <linux/profile.h> | 51 | #include <linux/profile.h> |
| 51 | #include <linux/rmap.h> | 52 | #include <linux/rmap.h> |
| 52 | #include <linux/ksm.h> | 53 | #include <linux/ksm.h> |
| @@ -1464,6 +1465,8 @@ bad_fork_cleanup_io: | |||
| 1464 | if (p->io_context) | 1465 | if (p->io_context) |
| 1465 | exit_io_context(p); | 1466 | exit_io_context(p); |
| 1466 | bad_fork_cleanup_namespaces: | 1467 | bad_fork_cleanup_namespaces: |
| 1468 | if (unlikely(clone_flags & CLONE_NEWPID)) | ||
| 1469 | pid_ns_release_proc(p->nsproxy->pid_ns); | ||
| 1467 | exit_task_namespaces(p); | 1470 | exit_task_namespaces(p); |
| 1468 | bad_fork_cleanup_mm: | 1471 | bad_fork_cleanup_mm: |
| 1469 | if (p->mm) | 1472 | if (p->mm) |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 6080f6bc8c33..3914c1e03cff 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
| @@ -518,6 +518,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
| 518 | out_unlock: | 518 | out_unlock: |
| 519 | raw_spin_unlock(&desc->lock); | 519 | raw_spin_unlock(&desc->lock); |
| 520 | } | 520 | } |
| 521 | EXPORT_SYMBOL(handle_edge_irq); | ||
| 521 | 522 | ||
| 522 | #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER | 523 | #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER |
| 523 | /** | 524 | /** |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index d86e254b95eb..192a302d6cfd 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
| @@ -112,6 +112,7 @@ struct irq_desc *irq_to_desc(unsigned int irq) | |||
| 112 | { | 112 | { |
| 113 | return radix_tree_lookup(&irq_desc_tree, irq); | 113 | return radix_tree_lookup(&irq_desc_tree, irq); |
| 114 | } | 114 | } |
| 115 | EXPORT_SYMBOL(irq_to_desc); | ||
| 115 | 116 | ||
| 116 | static void delete_irq_desc(unsigned int irq) | 117 | static void delete_irq_desc(unsigned int irq) |
| 117 | { | 118 | { |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 0533a688ce22..e5212ae294f6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -6382,6 +6382,8 @@ static int __sdt_alloc(const struct cpumask *cpu_map) | |||
| 6382 | if (!sg) | 6382 | if (!sg) |
| 6383 | return -ENOMEM; | 6383 | return -ENOMEM; |
| 6384 | 6384 | ||
| 6385 | sg->next = sg; | ||
| 6386 | |||
| 6385 | *per_cpu_ptr(sdd->sg, j) = sg; | 6387 | *per_cpu_ptr(sdd->sg, j) = sg; |
| 6386 | 6388 | ||
| 6387 | sgp = kzalloc_node(sizeof(struct sched_group_power), | 6389 | sgp = kzalloc_node(sizeof(struct sched_group_power), |
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 079a93ae8a9d..29111da1d100 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
| @@ -294,6 +294,9 @@ static int __ftrace_set_clr_event(const char *match, const char *sub, | |||
| 294 | if (!call->name || !call->class || !call->class->reg) | 294 | if (!call->name || !call->class || !call->class->reg) |
| 295 | continue; | 295 | continue; |
| 296 | 296 | ||
| 297 | if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) | ||
| 298 | continue; | ||
| 299 | |||
| 297 | if (match && | 300 | if (match && |
| 298 | strcmp(match, call->name) != 0 && | 301 | strcmp(match, call->name) != 0 && |
| 299 | strcmp(match, call->class->system) != 0) | 302 | strcmp(match, call->class->system) != 0) |
| @@ -1164,7 +1167,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | |||
| 1164 | return -1; | 1167 | return -1; |
| 1165 | } | 1168 | } |
| 1166 | 1169 | ||
| 1167 | if (call->class->reg) | 1170 | if (call->class->reg && !(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) |
| 1168 | trace_create_file("enable", 0644, call->dir, call, | 1171 | trace_create_file("enable", 0644, call->dir, call, |
| 1169 | enable); | 1172 | enable); |
| 1170 | 1173 | ||
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index 3dd15e8bc856..e039906b037d 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
| @@ -180,6 +180,7 @@ struct ftrace_event_call __used event_##call = { \ | |||
| 180 | .event.type = etype, \ | 180 | .event.type = etype, \ |
| 181 | .class = &event_class_ftrace_##call, \ | 181 | .class = &event_class_ftrace_##call, \ |
| 182 | .print_fmt = print, \ | 182 | .print_fmt = print, \ |
| 183 | .flags = TRACE_EVENT_FL_IGNORE_ENABLE, \ | ||
| 183 | }; \ | 184 | }; \ |
| 184 | struct ftrace_event_call __used \ | 185 | struct ftrace_event_call __used \ |
| 185 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call; | 186 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call; |
