Merge tag 'v3.10.77' into update

This is the 3.10.77 stable release
This commit is contained in:
Stricted
2018-03-21 22:44:34 +01:00
76 changed files with 458 additions and 180 deletions
+20
View File
@@ -720,6 +720,8 @@ static int ptrace_peek_siginfo(struct task_struct *child,
static int ptrace_resume(struct task_struct *child, long request,
unsigned long data)
{
bool need_siglock;
if (!valid_signal(data))
return -EIO;
@@ -747,8 +749,26 @@ static int ptrace_resume(struct task_struct *child, long request,
user_disable_single_step(child);
}
/*
* Change ->exit_code and ->state under siglock to avoid the race
* with wait_task_stopped() in between; a non-zero ->exit_code will
* wrongly look like another report from tracee.
*
* Note that we need siglock even if ->exit_code == data and/or this
* status was not reported yet, the new status must not be cleared by
* wait_task_stopped() after resume.
*
* If data == 0 we do not care if wait_task_stopped() reports the old
* status and clears the code too; this can't race with the tracee, it
* takes siglock after resume.
*/
need_siglock = data && !thread_group_empty(current);
if (need_siglock)
spin_lock_irq(&child->sighand->siglock);
child->exit_code = data;
wake_up_state(child, __TASK_TRACED);
if (need_siglock)
spin_unlock_irq(&child->sighand->siglock);
return 0;
}
+5 -1
View File
@@ -779,9 +779,13 @@ static void run_ksoftirqd(unsigned int cpu)
local_irq_disable();
if (local_softirq_pending()) {
__do_softirq();
rcu_note_context_switch(cpu);
local_irq_enable();
cond_resched();
preempt_disable();
rcu_note_context_switch(cpu);
preempt_enable();
return;
}
local_irq_enable();
+5 -6
View File
@@ -2678,7 +2678,7 @@ static DEFINE_PER_CPU(unsigned int, current_context);
static __always_inline int trace_recursive_lock(void)
{
unsigned int val = this_cpu_read(current_context);
unsigned int val = __this_cpu_read(current_context);
int bit;
if (in_interrupt()) {
@@ -2695,18 +2695,17 @@ static __always_inline int trace_recursive_lock(void)
return 1;
val |= (1 << bit);
this_cpu_write(current_context, val);
__this_cpu_write(current_context, val);
return 0;
}
static __always_inline void trace_recursive_unlock(void)
{
unsigned int val = this_cpu_read(current_context);
unsigned int val = __this_cpu_read(current_context);
val--;
val &= this_cpu_read(current_context);
this_cpu_write(current_context, val);
val &= val & (val - 1);
__this_cpu_write(current_context, val);
}
#else