mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two entries being added at the same time to the IFLA policy table, whilst parallel bug fixes to decnet routing dst handling overlapping with the dst gc removal in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
3d09198243
213 changed files with 2109 additions and 1711 deletions
|
|
@ -1312,8 +1312,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
|
|||
ret = __irq_set_trigger(desc,
|
||||
new->flags & IRQF_TRIGGER_MASK);
|
||||
|
||||
if (ret)
|
||||
if (ret) {
|
||||
irq_release_resources(desc);
|
||||
goto out_mask;
|
||||
}
|
||||
}
|
||||
|
||||
desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
|
||||
|
|
|
|||
|
|
@ -59,7 +59,11 @@ static void notrace klp_ftrace_handler(unsigned long ip,
|
|||
|
||||
ops = container_of(fops, struct klp_ops, fops);
|
||||
|
||||
rcu_read_lock();
|
||||
/*
|
||||
* A variant of synchronize_sched() is used to allow patching functions
|
||||
* where RCU is not watching, see klp_synchronize_transition().
|
||||
*/
|
||||
preempt_disable_notrace();
|
||||
|
||||
func = list_first_or_null_rcu(&ops->func_stack, struct klp_func,
|
||||
stack_node);
|
||||
|
|
@ -115,7 +119,7 @@ static void notrace klp_ftrace_handler(unsigned long ip,
|
|||
|
||||
klp_arch_set_pc(regs, (unsigned long)func->new_func);
|
||||
unlock:
|
||||
rcu_read_unlock();
|
||||
preempt_enable_notrace();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -48,6 +48,28 @@ static void klp_transition_work_fn(struct work_struct *work)
|
|||
}
|
||||
static DECLARE_DELAYED_WORK(klp_transition_work, klp_transition_work_fn);
|
||||
|
||||
/*
|
||||
* This function is just a stub to implement a hard force
|
||||
* of synchronize_sched(). This requires synchronizing
|
||||
* tasks even in userspace and idle.
|
||||
*/
|
||||
static void klp_sync(struct work_struct *work)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* We allow to patch also functions where RCU is not watching,
|
||||
* e.g. before user_exit(). We can not rely on the RCU infrastructure
|
||||
* to do the synchronization. Instead hard force the sched synchronization.
|
||||
*
|
||||
* This approach allows to use RCU functions for manipulating func_stack
|
||||
* safely.
|
||||
*/
|
||||
static void klp_synchronize_transition(void)
|
||||
{
|
||||
schedule_on_each_cpu(klp_sync);
|
||||
}
|
||||
|
||||
/*
|
||||
* The transition to the target patch state is complete. Clean up the data
|
||||
* structures.
|
||||
|
|
@ -73,7 +95,7 @@ static void klp_complete_transition(void)
|
|||
* func->transition gets cleared, the handler may choose a
|
||||
* removed function.
|
||||
*/
|
||||
synchronize_rcu();
|
||||
klp_synchronize_transition();
|
||||
}
|
||||
|
||||
if (klp_transition_patch->immediate)
|
||||
|
|
@ -92,7 +114,7 @@ static void klp_complete_transition(void)
|
|||
|
||||
/* Prevent klp_ftrace_handler() from seeing KLP_UNDEFINED state */
|
||||
if (klp_target_state == KLP_PATCHED)
|
||||
synchronize_rcu();
|
||||
klp_synchronize_transition();
|
||||
|
||||
read_lock(&tasklist_lock);
|
||||
for_each_process_thread(g, task) {
|
||||
|
|
@ -136,7 +158,11 @@ void klp_cancel_transition(void)
|
|||
*/
|
||||
void klp_update_patch_state(struct task_struct *task)
|
||||
{
|
||||
rcu_read_lock();
|
||||
/*
|
||||
* A variant of synchronize_sched() is used to allow patching functions
|
||||
* where RCU is not watching, see klp_synchronize_transition().
|
||||
*/
|
||||
preempt_disable_notrace();
|
||||
|
||||
/*
|
||||
* This test_and_clear_tsk_thread_flag() call also serves as a read
|
||||
|
|
@ -153,7 +179,7 @@ void klp_update_patch_state(struct task_struct *task)
|
|||
if (test_and_clear_tsk_thread_flag(task, TIF_PATCH_PENDING))
|
||||
task->patch_state = READ_ONCE(klp_target_state);
|
||||
|
||||
rcu_read_unlock();
|
||||
preempt_enable_notrace();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -539,7 +565,7 @@ void klp_reverse_transition(void)
|
|||
clear_tsk_thread_flag(idle_task(cpu), TIF_PATCH_PENDING);
|
||||
|
||||
/* Let any remaining calls to klp_update_patch_state() complete */
|
||||
synchronize_rcu();
|
||||
klp_synchronize_transition();
|
||||
|
||||
klp_start_transition();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5605,7 +5605,7 @@ void idle_task_exit(void)
|
|||
BUG_ON(cpu_online(smp_processor_id()));
|
||||
|
||||
if (mm != &init_mm) {
|
||||
switch_mm_irqs_off(mm, &init_mm, current);
|
||||
switch_mm(mm, &init_mm, current);
|
||||
finish_arch_post_lock_switch();
|
||||
}
|
||||
mmdrop(mm);
|
||||
|
|
|
|||
|
|
@ -3563,7 +3563,7 @@ static inline void check_schedstat_required(void)
|
|||
trace_sched_stat_runtime_enabled()) {
|
||||
printk_deferred_once("Scheduler tracepoints stat_sleep, stat_iowait, "
|
||||
"stat_blocked and stat_runtime require the "
|
||||
"kernel parameter schedstats=enabled or "
|
||||
"kernel parameter schedstats=enable or "
|
||||
"kernel.sched_schedstats=1\n");
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ void alarm_start_relative(struct alarm *alarm, ktime_t start)
|
|||
{
|
||||
struct alarm_base *base = &alarm_bases[alarm->type];
|
||||
|
||||
start = ktime_add(start, base->gettime());
|
||||
start = ktime_add_safe(start, base->gettime());
|
||||
alarm_start(alarm, start);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(alarm_start_relative);
|
||||
|
|
@ -475,7 +475,7 @@ u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval)
|
|||
overrun++;
|
||||
}
|
||||
|
||||
alarm->node.expires = ktime_add(alarm->node.expires, interval);
|
||||
alarm->node.expires = ktime_add_safe(alarm->node.expires, interval);
|
||||
return overrun;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(alarm_forward);
|
||||
|
|
@ -660,13 +660,21 @@ static int alarm_timer_set(struct k_itimer *timr, int flags,
|
|||
|
||||
/* start the timer */
|
||||
timr->it.alarm.interval = timespec64_to_ktime(new_setting->it_interval);
|
||||
|
||||
/*
|
||||
* Rate limit to the tick as a hot fix to prevent DOS. Will be
|
||||
* mopped up later.
|
||||
*/
|
||||
if (timr->it.alarm.interval < TICK_NSEC)
|
||||
timr->it.alarm.interval = TICK_NSEC;
|
||||
|
||||
exp = timespec64_to_ktime(new_setting->it_value);
|
||||
/* Convert (if necessary) to absolute time */
|
||||
if (flags != TIMER_ABSTIME) {
|
||||
ktime_t now;
|
||||
|
||||
now = alarm_bases[timr->it.alarm.alarmtimer.type].gettime();
|
||||
exp = ktime_add(now, exp);
|
||||
exp = ktime_add_safe(now, exp);
|
||||
}
|
||||
|
||||
alarm_start(&timr->it.alarm.alarmtimer, exp);
|
||||
|
|
|
|||
|
|
@ -37,9 +37,11 @@ static int tick_broadcast_forced;
|
|||
static __cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(tick_broadcast_lock);
|
||||
|
||||
#ifdef CONFIG_TICK_ONESHOT
|
||||
static void tick_broadcast_setup_oneshot(struct clock_event_device *bc);
|
||||
static void tick_broadcast_clear_oneshot(int cpu);
|
||||
static void tick_resume_broadcast_oneshot(struct clock_event_device *bc);
|
||||
#else
|
||||
static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc) { BUG(); }
|
||||
static inline void tick_broadcast_clear_oneshot(int cpu) { }
|
||||
static inline void tick_resume_broadcast_oneshot(struct clock_event_device *bc) { }
|
||||
#endif
|
||||
|
|
@ -867,7 +869,7 @@ static void tick_broadcast_init_next_event(struct cpumask *mask,
|
|||
/**
|
||||
* tick_broadcast_setup_oneshot - setup the broadcast device
|
||||
*/
|
||||
void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
|
||||
static void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
|
|||
|
||||
/* Functions related to oneshot broadcasting */
|
||||
#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT)
|
||||
extern void tick_broadcast_setup_oneshot(struct clock_event_device *bc);
|
||||
extern void tick_broadcast_switch_to_oneshot(void);
|
||||
extern void tick_shutdown_broadcast_oneshot(unsigned int cpu);
|
||||
extern int tick_broadcast_oneshot_active(void);
|
||||
|
|
@ -134,7 +133,6 @@ extern void tick_check_oneshot_broadcast_this_cpu(void);
|
|||
bool tick_broadcast_oneshot_available(void);
|
||||
extern struct cpumask *tick_get_broadcast_oneshot_mask(void);
|
||||
#else /* !(BROADCAST && ONESHOT): */
|
||||
static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc) { BUG(); }
|
||||
static inline void tick_broadcast_switch_to_oneshot(void) { }
|
||||
static inline void tick_shutdown_broadcast_oneshot(unsigned int cpu) { }
|
||||
static inline int tick_broadcast_oneshot_active(void) { return 0; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue