diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup.c | 26 | ||||
-rw-r--r-- | kernel/cpu/idle.c | 3 | ||||
-rw-r--r-- | kernel/events/core.c | 6 | ||||
-rw-r--r-- | kernel/printk/printk.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_events.c | 6 | ||||
-rw-r--r-- | kernel/trace/trace_export.c | 7 |
6 files changed, 24 insertions, 26 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index c4f8bc79..1c204fd 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -4410,16 +4410,6 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, rcu_assign_pointer(cgrp->name, name); /* - * Temporarily set the pointer to NULL, so idr_find() won't return - * a half-baked cgroup. - */ - cgrp->id = idr_alloc(&root->cgroup_idr, NULL, 1, 0, GFP_KERNEL); - if (cgrp->id < 0) { - err = -ENOMEM; - goto err_free_name; - } - - /* * Only live parents can have children. Note that the liveliness * check isn't strictly necessary because cgroup_mkdir() and * cgroup_rmdir() are fully synchronized by i_mutex; however, do it @@ -4428,7 +4418,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, */ if (!cgroup_lock_live_group(parent)) { err = -ENODEV; - goto err_free_id; + goto err_free_name; } /* Grab a reference on the superblock so the hierarchy doesn't @@ -4438,6 +4428,16 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, * fs */ atomic_inc(&sb->s_active); + /* + * Temporarily set the pointer to NULL, so idr_find() won't return + * a half-baked cgroup. + */ + cgrp->id = idr_alloc(&root->cgroup_idr, NULL, 1, 0, GFP_KERNEL); + if (cgrp->id < 0) { + err = -ENOMEM; + goto err_unlock; + } + init_cgroup_housekeeping(cgrp); dentry->d_fsdata = cgrp; @@ -4544,11 +4544,11 @@ err_free_all: ss->css_free(css); } } + idr_remove(&root->cgroup_idr, cgrp->id); +err_unlock: mutex_unlock(&cgroup_mutex); /* Release the reference count that we took on the superblock */ deactivate_super(sb); -err_free_id: - idr_remove(&root->cgroup_idr, cgrp->id); err_free_name: kfree(rcu_dereference_raw(cgrp->name)); err_free_cgrp: diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c index c261409..3f696c1 100644 --- a/kernel/cpu/idle.c +++ b/kernel/cpu/idle.c @@ -107,6 +107,9 @@ static void cpu_idle_loop(void) arch_cpu_idle_exit(); } tick_nohz_idle_exit(); +#ifdef CONFIG_FSL_ERRATUM_A_006184 + mtspr(SPRN_TSR, TSR_ENW); +#endif schedule_preempt_disabled(); } } diff --git a/kernel/events/core.c b/kernel/events/core.c index 420de7f..40c3397 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -851,6 +851,7 @@ void perf_pmu_disable(struct pmu *pmu) if (!(*count)++) pmu->pmu_disable(pmu); } +EXPORT_SYMBOL_GPL(perf_pmu_disable); void perf_pmu_enable(struct pmu *pmu) { @@ -858,6 +859,7 @@ void perf_pmu_enable(struct pmu *pmu) if (!--(*count)) pmu->pmu_enable(pmu); } +EXPORT_SYMBOL_GPL(perf_pmu_enable); static DEFINE_PER_CPU(struct list_head, rotation_list); @@ -3738,6 +3740,7 @@ void perf_event_update_userpage(struct perf_event *event) unlock: rcu_read_unlock(); } +EXPORT_SYMBOL_GPL(perf_event_update_userpage); static int perf_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { @@ -5327,6 +5330,7 @@ int perf_event_overflow(struct perf_event *event, { return __perf_event_overflow(event, 1, data, regs); } +EXPORT_SYMBOL_GPL(perf_event_overflow); /* * Generic software event infrastructure @@ -6488,6 +6492,7 @@ free_pdc: free_percpu(pmu->pmu_disable_count); goto unlock; } +EXPORT_SYMBOL_GPL(perf_pmu_register); void perf_pmu_unregister(struct pmu *pmu) { @@ -6509,6 +6514,7 @@ void perf_pmu_unregister(struct pmu *pmu) put_device(pmu->dev); free_pmu_context(pmu); } +EXPORT_SYMBOL_GPL(perf_pmu_unregister); struct pmu *perf_init_event(struct perf_event *event) { diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 0a63f7b..981ff61 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1104,7 +1104,6 @@ try_again: next_seq = log_next_seq; len = 0; - prev = 0; while (len >= 0 && seq < next_seq) { struct printk_log *msg = log_from_idx(idx); int textlen; @@ -2880,7 +2879,6 @@ bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog, next_idx = idx; l = 0; - prev = 0; while (seq < dumper->next_seq) { struct printk_log *msg = log_from_idx(idx); diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 7531ded..9e49f3f 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -27,12 +27,6 @@ DEFINE_MUTEX(event_mutex); -DEFINE_MUTEX(event_storage_mutex); -EXPORT_SYMBOL_GPL(event_storage_mutex); - -char event_storage[EVENT_STORAGE_SIZE]; -EXPORT_SYMBOL_GPL(event_storage); - LIST_HEAD(ftrace_events); static LIST_HEAD(ftrace_common_fields); diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index d21a746..d7d0b50 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c @@ -95,15 +95,12 @@ static void __always_unused ____ftrace_check_##name(void) \ #undef __array #define __array(type, item, len) \ do { \ + char *type_str = #type"["__stringify(len)"]"; \ BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ - mutex_lock(&event_storage_mutex); \ - snprintf(event_storage, sizeof(event_storage), \ - "%s[%d]", #type, len); \ - ret = trace_define_field(event_call, event_storage, #item, \ + ret = trace_define_field(event_call, type_str, #item, \ offsetof(typeof(field), item), \ sizeof(field.item), \ is_signed_type(type), filter_type); \ - mutex_unlock(&event_storage_mutex); \ if (ret) \ return ret; \ } while (0); |