diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /kernel/sched/core.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 759f4bd52cd6..803c3bc274c4 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -3502,6 +3502,31 @@ asmlinkage __visible void __sched schedule(void) | |||
3502 | } | 3502 | } |
3503 | EXPORT_SYMBOL(schedule); | 3503 | EXPORT_SYMBOL(schedule); |
3504 | 3504 | ||
3505 | /* | ||
3506 | * synchronize_rcu_tasks() makes sure that no task is stuck in preempted | ||
3507 | * state (have scheduled out non-voluntarily) by making sure that all | ||
3508 | * tasks have either left the run queue or have gone into user space. | ||
3509 | * As idle tasks do not do either, they must not ever be preempted | ||
3510 | * (schedule out non-voluntarily). | ||
3511 | * | ||
3512 | * schedule_idle() is similar to schedule_preempt_disable() except that it | ||
3513 | * never enables preemption because it does not call sched_submit_work(). | ||
3514 | */ | ||
3515 | void __sched schedule_idle(void) | ||
3516 | { | ||
3517 | /* | ||
3518 | * As this skips calling sched_submit_work(), which the idle task does | ||
3519 | * regardless because that function is a nop when the task is in a | ||
3520 | * TASK_RUNNING state, make sure this isn't used someplace that the | ||
3521 | * current task can be in any other state. Note, idle is always in the | ||
3522 | * TASK_RUNNING state. | ||
3523 | */ | ||
3524 | WARN_ON_ONCE(current->state); | ||
3525 | do { | ||
3526 | __schedule(false); | ||
3527 | } while (need_resched()); | ||
3528 | } | ||
3529 | |||
3505 | #ifdef CONFIG_CONTEXT_TRACKING | 3530 | #ifdef CONFIG_CONTEXT_TRACKING |
3506 | asmlinkage __visible void __sched schedule_user(void) | 3531 | asmlinkage __visible void __sched schedule_user(void) |
3507 | { | 3532 | { |