Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Filling in the padding slot in the bpf structure as a bug fix in 'ne' overlapped with actually using that padding area for something in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -193,7 +193,7 @@ EXPORT_SYMBOL_GPL(kthread_parkme);
|
||||
|
||||
void kthread_park_complete(struct task_struct *k)
|
||||
{
|
||||
complete(&to_kthread(k)->parked);
|
||||
complete_all(&to_kthread(k)->parked);
|
||||
}
|
||||
|
||||
static int kthread(void *_create)
|
||||
@@ -459,6 +459,7 @@ void kthread_unpark(struct task_struct *k)
|
||||
if (test_bit(KTHREAD_IS_PER_CPU, &kthread->flags))
|
||||
__kthread_bind(k, kthread->cpu, TASK_PARKED);
|
||||
|
||||
reinit_completion(&kthread->parked);
|
||||
clear_bit(KTHREAD_SHOULD_PARK, &kthread->flags);
|
||||
wake_up_state(k, TASK_PARKED);
|
||||
}
|
||||
@@ -483,9 +484,6 @@ int kthread_park(struct task_struct *k)
|
||||
if (WARN_ON(k->flags & PF_EXITING))
|
||||
return -ENOSYS;
|
||||
|
||||
if (WARN_ON_ONCE(test_bit(KTHREAD_SHOULD_PARK, &kthread->flags)))
|
||||
return -EBUSY;
|
||||
|
||||
set_bit(KTHREAD_SHOULD_PARK, &kthread->flags);
|
||||
if (k != current) {
|
||||
wake_up_process(k);
|
||||
|
||||
@@ -1708,7 +1708,7 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att
|
||||
rcu_read_unlock();
|
||||
|
||||
if (rq && sched_debug_enabled) {
|
||||
pr_info("span: %*pbl (max cpu_capacity = %lu)\n",
|
||||
pr_info("root domain span: %*pbl (max cpu_capacity = %lu)\n",
|
||||
cpumask_pr_args(cpu_map), rq->rd->max_cpu_capacity);
|
||||
}
|
||||
|
||||
|
||||
@@ -893,7 +893,7 @@ int __trace_bputs(unsigned long ip, const char *str)
|
||||
EXPORT_SYMBOL_GPL(__trace_bputs);
|
||||
|
||||
#ifdef CONFIG_TRACER_SNAPSHOT
|
||||
static void tracing_snapshot_instance(struct trace_array *tr)
|
||||
void tracing_snapshot_instance(struct trace_array *tr)
|
||||
{
|
||||
struct tracer *tracer = tr->current_trace;
|
||||
unsigned long flags;
|
||||
@@ -949,7 +949,7 @@ static int resize_buffer_duplicate_size(struct trace_buffer *trace_buf,
|
||||
struct trace_buffer *size_buf, int cpu_id);
|
||||
static void set_buffer_entries(struct trace_buffer *buf, unsigned long val);
|
||||
|
||||
static int alloc_snapshot(struct trace_array *tr)
|
||||
int tracing_alloc_snapshot_instance(struct trace_array *tr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -995,7 +995,7 @@ int tracing_alloc_snapshot(void)
|
||||
struct trace_array *tr = &global_trace;
|
||||
int ret;
|
||||
|
||||
ret = alloc_snapshot(tr);
|
||||
ret = tracing_alloc_snapshot_instance(tr);
|
||||
WARN_ON(ret < 0);
|
||||
|
||||
return ret;
|
||||
@@ -5408,7 +5408,7 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
|
||||
|
||||
#ifdef CONFIG_TRACER_MAX_TRACE
|
||||
if (t->use_max_tr && !had_max_tr) {
|
||||
ret = alloc_snapshot(tr);
|
||||
ret = tracing_alloc_snapshot_instance(tr);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
@@ -6451,7 +6451,7 @@ tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt,
|
||||
}
|
||||
#endif
|
||||
if (!tr->allocated_snapshot) {
|
||||
ret = alloc_snapshot(tr);
|
||||
ret = tracing_alloc_snapshot_instance(tr);
|
||||
if (ret < 0)
|
||||
break;
|
||||
}
|
||||
@@ -7179,7 +7179,7 @@ ftrace_trace_snapshot_callback(struct trace_array *tr, struct ftrace_hash *hash,
|
||||
return ret;
|
||||
|
||||
out_reg:
|
||||
ret = alloc_snapshot(tr);
|
||||
ret = tracing_alloc_snapshot_instance(tr);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -1817,6 +1817,17 @@ static inline void __init trace_event_init(void) { }
|
||||
static inline void trace_event_eval_update(struct trace_eval_map **map, int len) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACER_SNAPSHOT
|
||||
void tracing_snapshot_instance(struct trace_array *tr);
|
||||
int tracing_alloc_snapshot_instance(struct trace_array *tr);
|
||||
#else
|
||||
static inline void tracing_snapshot_instance(struct trace_array *tr) { }
|
||||
static inline int tracing_alloc_snapshot_instance(struct trace_array *tr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
extern struct trace_iterator *tracepoint_print_iter;
|
||||
|
||||
#endif /* _LINUX_KERNEL_TRACE_H */
|
||||
|
||||
@@ -483,9 +483,10 @@ clear_event_triggers(struct trace_array *tr)
|
||||
struct trace_event_file *file;
|
||||
|
||||
list_for_each_entry(file, &tr->events, list) {
|
||||
struct event_trigger_data *data;
|
||||
list_for_each_entry_rcu(data, &file->triggers, list) {
|
||||
struct event_trigger_data *data, *n;
|
||||
list_for_each_entry_safe(data, n, &file->triggers, list) {
|
||||
trace_event_trigger_enable_disable(file, 0);
|
||||
list_del_rcu(&data->list);
|
||||
if (data->ops->free)
|
||||
data->ops->free(data->ops, data);
|
||||
}
|
||||
@@ -642,6 +643,7 @@ event_trigger_callback(struct event_command *cmd_ops,
|
||||
trigger_data->count = -1;
|
||||
trigger_data->ops = trigger_ops;
|
||||
trigger_data->cmd_ops = cmd_ops;
|
||||
trigger_data->private_data = file;
|
||||
INIT_LIST_HEAD(&trigger_data->list);
|
||||
INIT_LIST_HEAD(&trigger_data->named_list);
|
||||
|
||||
@@ -1053,7 +1055,12 @@ static void
|
||||
snapshot_trigger(struct event_trigger_data *data, void *rec,
|
||||
struct ring_buffer_event *event)
|
||||
{
|
||||
tracing_snapshot();
|
||||
struct trace_event_file *file = data->private_data;
|
||||
|
||||
if (file)
|
||||
tracing_snapshot_instance(file->tr);
|
||||
else
|
||||
tracing_snapshot();
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1076,7 +1083,7 @@ register_snapshot_trigger(char *glob, struct event_trigger_ops *ops,
|
||||
{
|
||||
int ret = register_trigger(glob, ops, data, file);
|
||||
|
||||
if (ret > 0 && tracing_alloc_snapshot() != 0) {
|
||||
if (ret > 0 && tracing_alloc_snapshot_instance(file->tr) != 0) {
|
||||
unregister_trigger(glob, ops, data, file);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user