mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
Merge tag 'v4.9.242' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-4.9.y
This is the 4.9.242 stable release
This commit is contained in:
@@ -94,14 +94,6 @@ int dbg_switch_cpu;
|
||||
/* Use kdb or gdbserver mode */
|
||||
int dbg_kdb_mode = 1;
|
||||
|
||||
static int __init opt_kgdb_con(char *str)
|
||||
{
|
||||
kgdb_use_con = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
early_param("kgdbcon", opt_kgdb_con);
|
||||
|
||||
module_param(kgdb_use_con, int, 0644);
|
||||
module_param(kgdbreboot, int, 0644);
|
||||
|
||||
@@ -811,6 +803,20 @@ static struct console kgdbcons = {
|
||||
.index = -1,
|
||||
};
|
||||
|
||||
static int __init opt_kgdb_con(char *str)
|
||||
{
|
||||
kgdb_use_con = 1;
|
||||
|
||||
if (kgdb_io_module_registered && !kgdb_con_registered) {
|
||||
register_console(&kgdbcons);
|
||||
kgdb_con_registered = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
early_param("kgdbcon", opt_kgdb_con);
|
||||
|
||||
#ifdef CONFIG_MAGIC_SYSRQ
|
||||
static void sysrq_handle_dbg(int key)
|
||||
{
|
||||
|
||||
@@ -1756,14 +1756,9 @@ static __latent_entropy struct task_struct *copy_process(
|
||||
/* ok, now we should be set up.. */
|
||||
p->pid = pid_nr(pid);
|
||||
if (clone_flags & CLONE_THREAD) {
|
||||
p->exit_signal = -1;
|
||||
p->group_leader = current->group_leader;
|
||||
p->tgid = current->tgid;
|
||||
} else {
|
||||
if (clone_flags & CLONE_PARENT)
|
||||
p->exit_signal = current->group_leader->exit_signal;
|
||||
else
|
||||
p->exit_signal = (clone_flags & CSIGNAL);
|
||||
p->group_leader = p;
|
||||
p->tgid = p->pid;
|
||||
}
|
||||
@@ -1808,9 +1803,14 @@ static __latent_entropy struct task_struct *copy_process(
|
||||
if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) {
|
||||
p->real_parent = current->real_parent;
|
||||
p->parent_exec_id = current->parent_exec_id;
|
||||
if (clone_flags & CLONE_THREAD)
|
||||
p->exit_signal = -1;
|
||||
else
|
||||
p->exit_signal = current->group_leader->exit_signal;
|
||||
} else {
|
||||
p->real_parent = current;
|
||||
p->parent_exec_id = current->self_exec_id;
|
||||
p->exit_signal = (clone_flags & CSIGNAL);
|
||||
}
|
||||
|
||||
spin_lock(¤t->sighand->siglock);
|
||||
|
||||
@@ -828,7 +828,8 @@ void kthread_delayed_work_timer_fn(unsigned long __data)
|
||||
/* Move the work from worker->delayed_work_list. */
|
||||
WARN_ON_ONCE(list_empty(&work->node));
|
||||
list_del_init(&work->node);
|
||||
kthread_insert_work(worker, work, &worker->work_list);
|
||||
if (!work->canceling)
|
||||
kthread_insert_work(worker, work, &worker->work_list);
|
||||
|
||||
spin_unlock(&worker->lock);
|
||||
}
|
||||
|
||||
@@ -1650,18 +1650,18 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
|
||||
{
|
||||
struct ring_buffer_per_cpu *cpu_buffer;
|
||||
unsigned long nr_pages;
|
||||
int cpu, err = 0;
|
||||
int cpu, err;
|
||||
|
||||
/*
|
||||
* Always succeed at resizing a non-existent buffer:
|
||||
*/
|
||||
if (!buffer)
|
||||
return size;
|
||||
return 0;
|
||||
|
||||
/* Make sure the requested buffer exists */
|
||||
if (cpu_id != RING_BUFFER_ALL_CPUS &&
|
||||
!cpumask_test_cpu(cpu_id, buffer->cpumask))
|
||||
return size;
|
||||
return 0;
|
||||
|
||||
nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
|
||||
|
||||
@@ -1801,7 +1801,7 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
|
||||
}
|
||||
|
||||
mutex_unlock(&buffer->mutex);
|
||||
return size;
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
for_each_buffer_cpu(buffer, cpu) {
|
||||
|
||||
@@ -2403,7 +2403,7 @@ static char *get_trace_buf(void)
|
||||
|
||||
/* Interrupts must see nesting incremented before we use the buffer */
|
||||
barrier();
|
||||
return &buffer->buffer[buffer->nesting][0];
|
||||
return &buffer->buffer[buffer->nesting - 1][0];
|
||||
}
|
||||
|
||||
static void put_trace_buf(void)
|
||||
|
||||
@@ -491,6 +491,12 @@ enum {
|
||||
* can only be modified by current, we can reuse trace_recursion.
|
||||
*/
|
||||
TRACE_IRQ_BIT,
|
||||
|
||||
/*
|
||||
* When transitioning between context, the preempt_count() may
|
||||
* not be correct. Allow for a single recursion to cover this case.
|
||||
*/
|
||||
TRACE_TRANSITION_BIT,
|
||||
};
|
||||
|
||||
#define trace_recursion_set(bit) do { (current)->trace_recursion |= (1<<(bit)); } while (0)
|
||||
@@ -535,14 +541,27 @@ static __always_inline int trace_test_and_set_recursion(int start, int max)
|
||||
return 0;
|
||||
|
||||
bit = trace_get_context_bit() + start;
|
||||
if (unlikely(val & (1 << bit)))
|
||||
return -1;
|
||||
if (unlikely(val & (1 << bit))) {
|
||||
/*
|
||||
* It could be that preempt_count has not been updated during
|
||||
* a switch between contexts. Allow for a single recursion.
|
||||
*/
|
||||
bit = TRACE_TRANSITION_BIT;
|
||||
if (trace_recursion_test(bit))
|
||||
return -1;
|
||||
trace_recursion_set(bit);
|
||||
barrier();
|
||||
return bit + 1;
|
||||
}
|
||||
|
||||
/* Normal check passed, clear the transition to allow it again */
|
||||
trace_recursion_clear(TRACE_TRANSITION_BIT);
|
||||
|
||||
val |= 1 << bit;
|
||||
current->trace_recursion = val;
|
||||
barrier();
|
||||
|
||||
return bit;
|
||||
return bit + 1;
|
||||
}
|
||||
|
||||
static __always_inline void trace_clear_recursion(int bit)
|
||||
@@ -552,6 +571,7 @@ static __always_inline void trace_clear_recursion(int bit)
|
||||
if (!bit)
|
||||
return;
|
||||
|
||||
bit--;
|
||||
bit = 1 << bit;
|
||||
val &= ~bit;
|
||||
|
||||
|
||||
@@ -490,8 +490,13 @@ trace_selftest_function_recursion(void)
|
||||
unregister_ftrace_function(&test_rec_probe);
|
||||
|
||||
ret = -1;
|
||||
if (trace_selftest_recursion_cnt != 1) {
|
||||
pr_cont("*callback not called once (%d)* ",
|
||||
/*
|
||||
* Recursion allows for transitions between context,
|
||||
* and may call the callback twice.
|
||||
*/
|
||||
if (trace_selftest_recursion_cnt != 1 &&
|
||||
trace_selftest_recursion_cnt != 2) {
|
||||
pr_cont("*callback not called once (or twice) (%d)* ",
|
||||
trace_selftest_recursion_cnt);
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user