mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
Linux 4.12-rc5
-----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJZPdbLAAoJEHm+PkMAQRiGx4wH/1nCjfnl6fE8oJ24/1gEAOUh biFdqJkYZmlLYHVtYfLm4Ueg4adJdg0wx6qM/4RaAzmQVvLfDV34bc1qBf1+P95G kVF+osWyXrZo5cTwkwapHW/KNu4VJwAx2D1wrlxKDVG5AOrULH1pYOYGOpApEkZU 4N+q5+M0ce0GJpqtUZX+UnI33ygjdDbBxXoFKsr24B7eA0ouGbAJ7dC88WcaETL+ 2/7tT01SvDMo0jBSV0WIqlgXwZ5gp3yPGnklC3F4159Yze6VFrzHMKS/UpPF8o8E W9EbuzwxsKyXUifX2GY348L1f+47glen/1sedbuKnFhP6E9aqUQQJXvEO7ueQl4= =m2Gx -----END PGP SIGNATURE----- Merge tag 'v4.12-rc5' into for-4.13/block We've already got a few conflicts and upcoming work depends on some of the changes that have gone into mainline as regression fixes for this series. Pull in 4.12-rc5 to resolve these conflicts and make it easier on down stream trees to continue working on 4.13 changes. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
commit
8f66439eec
742 changed files with 6992 additions and 3899 deletions
|
|
@ -86,6 +86,7 @@ static struct bpf_map *array_map_alloc(union bpf_attr *attr)
|
|||
array->map.key_size = attr->key_size;
|
||||
array->map.value_size = attr->value_size;
|
||||
array->map.max_entries = attr->max_entries;
|
||||
array->map.map_flags = attr->map_flags;
|
||||
array->elem_size = elem_size;
|
||||
|
||||
if (!percpu)
|
||||
|
|
|
|||
|
|
@ -432,6 +432,7 @@ static struct bpf_map *trie_alloc(union bpf_attr *attr)
|
|||
trie->map.key_size = attr->key_size;
|
||||
trie->map.value_size = attr->value_size;
|
||||
trie->map.max_entries = attr->max_entries;
|
||||
trie->map.map_flags = attr->map_flags;
|
||||
trie->data_size = attr->key_size -
|
||||
offsetof(struct bpf_lpm_trie_key, data);
|
||||
trie->max_prefixlen = trie->data_size * 8;
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ static struct bpf_map *stack_map_alloc(union bpf_attr *attr)
|
|||
smap->map.key_size = attr->key_size;
|
||||
smap->map.value_size = value_size;
|
||||
smap->map.max_entries = attr->max_entries;
|
||||
smap->map.map_flags = attr->map_flags;
|
||||
smap->n_buckets = n_buckets;
|
||||
smap->map.pages = round_up(cost, PAGE_SIZE) >> PAGE_SHIFT;
|
||||
|
||||
|
|
|
|||
|
|
@ -463,19 +463,22 @@ static const int caller_saved[CALLER_SAVED_REGS] = {
|
|||
BPF_REG_0, BPF_REG_1, BPF_REG_2, BPF_REG_3, BPF_REG_4, BPF_REG_5
|
||||
};
|
||||
|
||||
static void mark_reg_not_init(struct bpf_reg_state *regs, u32 regno)
|
||||
{
|
||||
BUG_ON(regno >= MAX_BPF_REG);
|
||||
|
||||
memset(®s[regno], 0, sizeof(regs[regno]));
|
||||
regs[regno].type = NOT_INIT;
|
||||
regs[regno].min_value = BPF_REGISTER_MIN_RANGE;
|
||||
regs[regno].max_value = BPF_REGISTER_MAX_RANGE;
|
||||
}
|
||||
|
||||
static void init_reg_state(struct bpf_reg_state *regs)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_BPF_REG; i++) {
|
||||
regs[i].type = NOT_INIT;
|
||||
regs[i].imm = 0;
|
||||
regs[i].min_value = BPF_REGISTER_MIN_RANGE;
|
||||
regs[i].max_value = BPF_REGISTER_MAX_RANGE;
|
||||
regs[i].min_align = 0;
|
||||
regs[i].aux_off = 0;
|
||||
regs[i].aux_off_align = 0;
|
||||
}
|
||||
for (i = 0; i < MAX_BPF_REG; i++)
|
||||
mark_reg_not_init(regs, i);
|
||||
|
||||
/* frame pointer */
|
||||
regs[BPF_REG_FP].type = FRAME_PTR;
|
||||
|
|
@ -843,9 +846,6 @@ static int check_ptr_alignment(struct bpf_verifier_env *env,
|
|||
{
|
||||
bool strict = env->strict_alignment;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
|
||||
strict = true;
|
||||
|
||||
switch (reg->type) {
|
||||
case PTR_TO_PACKET:
|
||||
return check_pkt_ptr_alignment(reg, off, size, strict);
|
||||
|
|
@ -1349,7 +1349,6 @@ static int check_call(struct bpf_verifier_env *env, int func_id, int insn_idx)
|
|||
struct bpf_verifier_state *state = &env->cur_state;
|
||||
const struct bpf_func_proto *fn = NULL;
|
||||
struct bpf_reg_state *regs = state->regs;
|
||||
struct bpf_reg_state *reg;
|
||||
struct bpf_call_arg_meta meta;
|
||||
bool changes_data;
|
||||
int i, err;
|
||||
|
|
@ -1416,11 +1415,8 @@ static int check_call(struct bpf_verifier_env *env, int func_id, int insn_idx)
|
|||
}
|
||||
|
||||
/* reset caller saved regs */
|
||||
for (i = 0; i < CALLER_SAVED_REGS; i++) {
|
||||
reg = regs + caller_saved[i];
|
||||
reg->type = NOT_INIT;
|
||||
reg->imm = 0;
|
||||
}
|
||||
for (i = 0; i < CALLER_SAVED_REGS; i++)
|
||||
mark_reg_not_init(regs, caller_saved[i]);
|
||||
|
||||
/* update return register */
|
||||
if (fn->ret_type == RET_INTEGER) {
|
||||
|
|
@ -2448,7 +2444,6 @@ static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn)
|
|||
{
|
||||
struct bpf_reg_state *regs = env->cur_state.regs;
|
||||
u8 mode = BPF_MODE(insn->code);
|
||||
struct bpf_reg_state *reg;
|
||||
int i, err;
|
||||
|
||||
if (!may_access_skb(env->prog->type)) {
|
||||
|
|
@ -2481,11 +2476,8 @@ static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn)
|
|||
}
|
||||
|
||||
/* reset caller saved regs to unreadable */
|
||||
for (i = 0; i < CALLER_SAVED_REGS; i++) {
|
||||
reg = regs + caller_saved[i];
|
||||
reg->type = NOT_INIT;
|
||||
reg->imm = 0;
|
||||
}
|
||||
for (i = 0; i < CALLER_SAVED_REGS; i++)
|
||||
mark_reg_not_init(regs, caller_saved[i]);
|
||||
|
||||
/* mark destination R0 register as readable, since it contains
|
||||
* the value fetched from the packet
|
||||
|
|
@ -2696,7 +2688,8 @@ err_free:
|
|||
/* the following conditions reduce the number of explored insns
|
||||
* from ~140k to ~80k for ultra large programs that use a lot of ptr_to_packet
|
||||
*/
|
||||
static bool compare_ptrs_to_packet(struct bpf_reg_state *old,
|
||||
static bool compare_ptrs_to_packet(struct bpf_verifier_env *env,
|
||||
struct bpf_reg_state *old,
|
||||
struct bpf_reg_state *cur)
|
||||
{
|
||||
if (old->id != cur->id)
|
||||
|
|
@ -2739,7 +2732,7 @@ static bool compare_ptrs_to_packet(struct bpf_reg_state *old,
|
|||
* 'if (R4 > data_end)' and all further insn were already good with r=20,
|
||||
* so they will be good with r=30 and we can prune the search.
|
||||
*/
|
||||
if (old->off <= cur->off &&
|
||||
if (!env->strict_alignment && old->off <= cur->off &&
|
||||
old->off >= old->range && cur->off >= cur->range)
|
||||
return true;
|
||||
|
||||
|
|
@ -2810,7 +2803,7 @@ static bool states_equal(struct bpf_verifier_env *env,
|
|||
continue;
|
||||
|
||||
if (rold->type == PTR_TO_PACKET && rcur->type == PTR_TO_PACKET &&
|
||||
compare_ptrs_to_packet(rold, rcur))
|
||||
compare_ptrs_to_packet(env, rold, rcur))
|
||||
continue;
|
||||
|
||||
return false;
|
||||
|
|
@ -3588,10 +3581,10 @@ int bpf_check(struct bpf_prog **prog, union bpf_attr *attr)
|
|||
} else {
|
||||
log_level = 0;
|
||||
}
|
||||
if (attr->prog_flags & BPF_F_STRICT_ALIGNMENT)
|
||||
|
||||
env->strict_alignment = !!(attr->prog_flags & BPF_F_STRICT_ALIGNMENT);
|
||||
if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
|
||||
env->strict_alignment = true;
|
||||
else
|
||||
env->strict_alignment = false;
|
||||
|
||||
ret = replace_map_fd_with_map_ptr(env);
|
||||
if (ret < 0)
|
||||
|
|
@ -3697,7 +3690,10 @@ int bpf_analyzer(struct bpf_prog *prog, const struct bpf_ext_analyzer_ops *ops,
|
|||
mutex_lock(&bpf_verifier_lock);
|
||||
|
||||
log_level = 0;
|
||||
|
||||
env->strict_alignment = false;
|
||||
if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
|
||||
env->strict_alignment = true;
|
||||
|
||||
env->explored_states = kcalloc(env->prog->len,
|
||||
sizeof(struct bpf_verifier_state_list *),
|
||||
|
|
|
|||
|
|
@ -4265,6 +4265,11 @@ static void kill_css(struct cgroup_subsys_state *css)
|
|||
{
|
||||
lockdep_assert_held(&cgroup_mutex);
|
||||
|
||||
if (css->flags & CSS_DYING)
|
||||
return;
|
||||
|
||||
css->flags |= CSS_DYING;
|
||||
|
||||
/*
|
||||
* This must happen before css is disassociated with its cgroup.
|
||||
* See seq_css() for details.
|
||||
|
|
|
|||
|
|
@ -176,9 +176,9 @@ typedef enum {
|
|||
} cpuset_flagbits_t;
|
||||
|
||||
/* convenient tests for these bits */
|
||||
static inline bool is_cpuset_online(const struct cpuset *cs)
|
||||
static inline bool is_cpuset_online(struct cpuset *cs)
|
||||
{
|
||||
return test_bit(CS_ONLINE, &cs->flags);
|
||||
return test_bit(CS_ONLINE, &cs->flags) && !css_is_dying(&cs->css);
|
||||
}
|
||||
|
||||
static inline int is_cpu_exclusive(const struct cpuset *cs)
|
||||
|
|
|
|||
|
|
@ -1658,13 +1658,13 @@ static ssize_t write_cpuhp_target(struct device *dev,
|
|||
ret = !sp->name || sp->cant_stop ? -EINVAL : 0;
|
||||
mutex_unlock(&cpuhp_state_mutex);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
if (st->state < target)
|
||||
ret = do_cpu_up(dev->id, target);
|
||||
else
|
||||
ret = do_cpu_down(dev->id, target);
|
||||
|
||||
out:
|
||||
unlock_device_hotplug();
|
||||
return ret ? ret : count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7316,6 +7316,21 @@ int perf_event_account_interrupt(struct perf_event *event)
|
|||
return __perf_event_account_interrupt(event, 1);
|
||||
}
|
||||
|
||||
static bool sample_is_allowed(struct perf_event *event, struct pt_regs *regs)
|
||||
{
|
||||
/*
|
||||
* Due to interrupt latency (AKA "skid"), we may enter the
|
||||
* kernel before taking an overflow, even if the PMU is only
|
||||
* counting user events.
|
||||
* To avoid leaking information to userspace, we must always
|
||||
* reject kernel samples when exclude_kernel is set.
|
||||
*/
|
||||
if (event->attr.exclude_kernel && !user_mode(regs))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic event overflow handling, sampling.
|
||||
*/
|
||||
|
|
@ -7336,6 +7351,12 @@ static int __perf_event_overflow(struct perf_event *event,
|
|||
|
||||
ret = __perf_event_account_interrupt(event, throttle);
|
||||
|
||||
/*
|
||||
* For security, drop the skid kernel samples if necessary.
|
||||
*/
|
||||
if (!sample_is_allowed(event, regs))
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* XXX event_limit might not quite work as expected on inherited
|
||||
* events
|
||||
|
|
|
|||
|
|
@ -1577,6 +1577,18 @@ static __latent_entropy struct task_struct *copy_process(
|
|||
if (!p)
|
||||
goto fork_out;
|
||||
|
||||
/*
|
||||
* This _must_ happen before we call free_task(), i.e. before we jump
|
||||
* to any of the bad_fork_* labels. This is to avoid freeing
|
||||
* p->set_child_tid which is (ab)used as a kthread's data pointer for
|
||||
* kernel threads (PF_KTHREAD).
|
||||
*/
|
||||
p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
|
||||
/*
|
||||
* Clear TID on mm_release()?
|
||||
*/
|
||||
p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr : NULL;
|
||||
|
||||
ftrace_graph_init_task(p);
|
||||
|
||||
rt_mutex_init_task(p);
|
||||
|
|
@ -1743,11 +1755,6 @@ static __latent_entropy struct task_struct *copy_process(
|
|||
}
|
||||
}
|
||||
|
||||
p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
|
||||
/*
|
||||
* Clear TID on mm_release()?
|
||||
*/
|
||||
p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr : NULL;
|
||||
#ifdef CONFIG_BLOCK
|
||||
p->plug = NULL;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ static void *alloc_insn_page(void)
|
|||
return module_alloc(PAGE_SIZE);
|
||||
}
|
||||
|
||||
static void free_insn_page(void *page)
|
||||
void __weak free_insn_page(void *page)
|
||||
{
|
||||
module_memfree(page);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ config LIVEPATCH
|
|||
depends on SYSFS
|
||||
depends on KALLSYMS_ALL
|
||||
depends on HAVE_LIVEPATCH
|
||||
depends on !TRIM_UNUSED_KSYMS
|
||||
help
|
||||
Say Y here if you want to support kernel live patching.
|
||||
This option has no runtime impact until a kernel "patch"
|
||||
|
|
|
|||
|
|
@ -1785,12 +1785,14 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock,
|
|||
int ret;
|
||||
|
||||
raw_spin_lock_irq(&lock->wait_lock);
|
||||
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
/* sleep on the mutex */
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
ret = __rt_mutex_slowlock(lock, TASK_INTERRUPTIBLE, to, waiter);
|
||||
|
||||
/*
|
||||
* try_to_take_rt_mutex() sets the waiter bit unconditionally. We might
|
||||
* have to fix that up.
|
||||
*/
|
||||
fixup_rt_mutex_waiters(lock);
|
||||
raw_spin_unlock_irq(&lock->wait_lock);
|
||||
|
||||
return ret;
|
||||
|
|
@ -1821,16 +1823,26 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock,
|
|||
bool cleanup = false;
|
||||
|
||||
raw_spin_lock_irq(&lock->wait_lock);
|
||||
/*
|
||||
* Do an unconditional try-lock, this deals with the lock stealing
|
||||
* state where __rt_mutex_futex_unlock() -> mark_wakeup_next_waiter()
|
||||
* sets a NULL owner.
|
||||
*
|
||||
* We're not interested in the return value, because the subsequent
|
||||
* test on rt_mutex_owner() will infer that. If the trylock succeeded,
|
||||
* we will own the lock and it will have removed the waiter. If we
|
||||
* failed the trylock, we're still not owner and we need to remove
|
||||
* ourselves.
|
||||
*/
|
||||
try_to_take_rt_mutex(lock, current, waiter);
|
||||
/*
|
||||
* Unless we're the owner; we're still enqueued on the wait_list.
|
||||
* So check if we became owner, if not, take us off the wait_list.
|
||||
*/
|
||||
if (rt_mutex_owner(lock) != current) {
|
||||
remove_waiter(lock, waiter);
|
||||
fixup_rt_mutex_waiters(lock);
|
||||
cleanup = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* try_to_take_rt_mutex() sets the waiter bit unconditionally. We might
|
||||
* have to fix that up.
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ int freeze_processes(void)
|
|||
if (!pm_freezing)
|
||||
atomic_inc(&system_freezing_cnt);
|
||||
|
||||
pm_wakeup_clear(true);
|
||||
pm_wakeup_clear();
|
||||
pr_info("Freezing user space processes ... ");
|
||||
pm_freezing = true;
|
||||
error = try_to_freeze_tasks(true);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ static void freeze_begin(void)
|
|||
|
||||
static void freeze_enter(void)
|
||||
{
|
||||
trace_suspend_resume(TPS("machine_suspend"), PM_SUSPEND_FREEZE, true);
|
||||
|
||||
spin_lock_irq(&suspend_freeze_lock);
|
||||
if (pm_wakeup_pending())
|
||||
goto out;
|
||||
|
|
@ -100,27 +98,6 @@ static void freeze_enter(void)
|
|||
out:
|
||||
suspend_freeze_state = FREEZE_STATE_NONE;
|
||||
spin_unlock_irq(&suspend_freeze_lock);
|
||||
|
||||
trace_suspend_resume(TPS("machine_suspend"), PM_SUSPEND_FREEZE, false);
|
||||
}
|
||||
|
||||
static void s2idle_loop(void)
|
||||
{
|
||||
do {
|
||||
freeze_enter();
|
||||
|
||||
if (freeze_ops && freeze_ops->wake)
|
||||
freeze_ops->wake();
|
||||
|
||||
dpm_resume_noirq(PMSG_RESUME);
|
||||
if (freeze_ops && freeze_ops->sync)
|
||||
freeze_ops->sync();
|
||||
|
||||
if (pm_wakeup_pending())
|
||||
break;
|
||||
|
||||
pm_wakeup_clear(false);
|
||||
} while (!dpm_suspend_noirq(PMSG_SUSPEND));
|
||||
}
|
||||
|
||||
void freeze_wake(void)
|
||||
|
|
@ -394,8 +371,10 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
|
|||
* all the devices are suspended.
|
||||
*/
|
||||
if (state == PM_SUSPEND_FREEZE) {
|
||||
s2idle_loop();
|
||||
goto Platform_early_resume;
|
||||
trace_suspend_resume(TPS("machine_suspend"), state, true);
|
||||
freeze_enter();
|
||||
trace_suspend_resume(TPS("machine_suspend"), state, false);
|
||||
goto Platform_wake;
|
||||
}
|
||||
|
||||
error = disable_nonboot_cpus();
|
||||
|
|
|
|||
|
|
@ -269,7 +269,6 @@ static struct console *exclusive_console;
|
|||
#define MAX_CMDLINECONSOLES 8
|
||||
|
||||
static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
|
||||
static int console_cmdline_cnt;
|
||||
|
||||
static int preferred_console = -1;
|
||||
int console_set_on_cmdline;
|
||||
|
|
@ -1906,25 +1905,12 @@ static int __add_preferred_console(char *name, int idx, char *options,
|
|||
* See if this tty is not yet registered, and
|
||||
* if we have a slot free.
|
||||
*/
|
||||
for (i = 0, c = console_cmdline; i < console_cmdline_cnt; i++, c++) {
|
||||
for (i = 0, c = console_cmdline;
|
||||
i < MAX_CMDLINECONSOLES && c->name[0];
|
||||
i++, c++) {
|
||||
if (strcmp(c->name, name) == 0 && c->index == idx) {
|
||||
if (brl_options)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Maintain an invariant that will help to find if
|
||||
* the matching console is preferred, see
|
||||
* register_console():
|
||||
*
|
||||
* The last non-braille console is always
|
||||
* the preferred one.
|
||||
*/
|
||||
if (i != console_cmdline_cnt - 1)
|
||||
swap(console_cmdline[i],
|
||||
console_cmdline[console_cmdline_cnt - 1]);
|
||||
|
||||
preferred_console = console_cmdline_cnt - 1;
|
||||
|
||||
if (!brl_options)
|
||||
preferred_console = i;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1937,7 +1923,6 @@ static int __add_preferred_console(char *name, int idx, char *options,
|
|||
braille_set_options(c, brl_options);
|
||||
|
||||
c->index = idx;
|
||||
console_cmdline_cnt++;
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
|
|
@ -2477,23 +2462,12 @@ void register_console(struct console *newcon)
|
|||
}
|
||||
|
||||
/*
|
||||
* See if this console matches one we selected on the command line.
|
||||
*
|
||||
* There may be several entries in the console_cmdline array matching
|
||||
* with the same console, one with newcon->match(), another by
|
||||
* name/index:
|
||||
*
|
||||
* pl011,mmio,0x87e024000000,115200 -- added from SPCR
|
||||
* ttyAMA0 -- added from command line
|
||||
*
|
||||
* Traverse the console_cmdline array in reverse order to be
|
||||
* sure that if this console is preferred then it will be the first
|
||||
* matching entry. We use the invariant that is maintained in
|
||||
* __add_preferred_console().
|
||||
* See if this console matches one we selected on
|
||||
* the command line.
|
||||
*/
|
||||
for (i = console_cmdline_cnt - 1; i >= 0; i--) {
|
||||
c = console_cmdline + i;
|
||||
|
||||
for (i = 0, c = console_cmdline;
|
||||
i < MAX_CMDLINECONSOLES && c->name[0];
|
||||
i++, c++) {
|
||||
if (!newcon->match ||
|
||||
newcon->match(newcon, c->name, c->index, c->options) != 0) {
|
||||
/* default matching */
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ EXPORT_SYMBOL_GPL(cleanup_srcu_struct);
|
|||
|
||||
/*
|
||||
* Counts the new reader in the appropriate per-CPU element of the
|
||||
* srcu_struct. Must be called from process context.
|
||||
* srcu_struct.
|
||||
* Returns an index that must be passed to the matching srcu_read_unlock().
|
||||
*/
|
||||
int __srcu_read_lock(struct srcu_struct *sp)
|
||||
|
|
@ -271,7 +271,7 @@ int __srcu_read_lock(struct srcu_struct *sp)
|
|||
int idx;
|
||||
|
||||
idx = READ_ONCE(sp->completed) & 0x1;
|
||||
__this_cpu_inc(sp->per_cpu_ref->lock_count[idx]);
|
||||
this_cpu_inc(sp->per_cpu_ref->lock_count[idx]);
|
||||
smp_mb(); /* B */ /* Avoid leaking the critical section. */
|
||||
return idx;
|
||||
}
|
||||
|
|
@ -281,7 +281,6 @@ EXPORT_SYMBOL_GPL(__srcu_read_lock);
|
|||
* Removes the count for the old reader from the appropriate per-CPU
|
||||
* element of the srcu_struct. Note that this may well be a different
|
||||
* CPU than that which was incremented by the corresponding srcu_read_lock().
|
||||
* Must be called from process context.
|
||||
*/
|
||||
void __srcu_read_unlock(struct srcu_struct *sp, int idx)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,8 +97,9 @@ EXPORT_SYMBOL_GPL(cleanup_srcu_struct);
|
|||
|
||||
/*
|
||||
* Counts the new reader in the appropriate per-CPU element of the
|
||||
* srcu_struct. Must be called from process context.
|
||||
* Returns an index that must be passed to the matching srcu_read_unlock().
|
||||
* srcu_struct. Can be invoked from irq/bh handlers, but the matching
|
||||
* __srcu_read_unlock() must be in the same handler instance. Returns an
|
||||
* index that must be passed to the matching srcu_read_unlock().
|
||||
*/
|
||||
int __srcu_read_lock(struct srcu_struct *sp)
|
||||
{
|
||||
|
|
@ -112,7 +113,7 @@ EXPORT_SYMBOL_GPL(__srcu_read_lock);
|
|||
|
||||
/*
|
||||
* Removes the count for the old reader from the appropriate element of
|
||||
* the srcu_struct. Must be called from process context.
|
||||
* the srcu_struct.
|
||||
*/
|
||||
void __srcu_read_unlock(struct srcu_struct *sp, int idx)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ EXPORT_SYMBOL_GPL(cleanup_srcu_struct);
|
|||
|
||||
/*
|
||||
* Counts the new reader in the appropriate per-CPU element of the
|
||||
* srcu_struct. Must be called from process context.
|
||||
* srcu_struct.
|
||||
* Returns an index that must be passed to the matching srcu_read_unlock().
|
||||
*/
|
||||
int __srcu_read_lock(struct srcu_struct *sp)
|
||||
|
|
@ -365,7 +365,7 @@ int __srcu_read_lock(struct srcu_struct *sp)
|
|||
int idx;
|
||||
|
||||
idx = READ_ONCE(sp->srcu_idx) & 0x1;
|
||||
__this_cpu_inc(sp->sda->srcu_lock_count[idx]);
|
||||
this_cpu_inc(sp->sda->srcu_lock_count[idx]);
|
||||
smp_mb(); /* B */ /* Avoid leaking the critical section. */
|
||||
return idx;
|
||||
}
|
||||
|
|
@ -375,7 +375,6 @@ EXPORT_SYMBOL_GPL(__srcu_read_lock);
|
|||
* Removes the count for the old reader from the appropriate per-CPU
|
||||
* element of the srcu_struct. Note that this may well be a different
|
||||
* CPU than that which was incremented by the corresponding srcu_read_lock().
|
||||
* Must be called from process context.
|
||||
*/
|
||||
void __srcu_read_unlock(struct srcu_struct *sp, int idx)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -825,8 +825,10 @@ static void check_thread_timers(struct task_struct *tsk,
|
|||
* At the hard limit, we just die.
|
||||
* No need to calculate anything else now.
|
||||
*/
|
||||
pr_info("CPU Watchdog Timeout (hard): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
if (print_fatal_signals) {
|
||||
pr_info("CPU Watchdog Timeout (hard): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
}
|
||||
__group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk);
|
||||
return;
|
||||
}
|
||||
|
|
@ -838,8 +840,10 @@ static void check_thread_timers(struct task_struct *tsk,
|
|||
soft += USEC_PER_SEC;
|
||||
sig->rlim[RLIMIT_RTTIME].rlim_cur = soft;
|
||||
}
|
||||
pr_info("RT Watchdog Timeout (soft): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
if (print_fatal_signals) {
|
||||
pr_info("RT Watchdog Timeout (soft): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
}
|
||||
__group_send_sig_info(SIGXCPU, SEND_SIG_PRIV, tsk);
|
||||
}
|
||||
}
|
||||
|
|
@ -936,8 +940,10 @@ static void check_process_timers(struct task_struct *tsk,
|
|||
* At the hard limit, we just die.
|
||||
* No need to calculate anything else now.
|
||||
*/
|
||||
pr_info("RT Watchdog Timeout (hard): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
if (print_fatal_signals) {
|
||||
pr_info("RT Watchdog Timeout (hard): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
}
|
||||
__group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk);
|
||||
return;
|
||||
}
|
||||
|
|
@ -945,8 +951,10 @@ static void check_process_timers(struct task_struct *tsk,
|
|||
/*
|
||||
* At the soft limit, send a SIGXCPU every second.
|
||||
*/
|
||||
pr_info("CPU Watchdog Timeout (soft): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
if (print_fatal_signals) {
|
||||
pr_info("CPU Watchdog Timeout (soft): %s[%d]\n",
|
||||
tsk->comm, task_pid_nr(tsk));
|
||||
}
|
||||
__group_send_sig_info(SIGXCPU, SEND_SIG_PRIV, tsk);
|
||||
if (soft < hard) {
|
||||
soft++;
|
||||
|
|
|
|||
|
|
@ -5063,7 +5063,7 @@ ftrace_graph_release(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
out:
|
||||
kfree(fgd->new_hash);
|
||||
free_ftrace_hash(fgd->new_hash);
|
||||
kfree(fgd);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue