)]}'
{
  "commit": "d5c61b75e5e186b88359d2d5a97cb860afedfe4b",
  "tree": "e0107be368d0922bfcd392202ee0e38d8216d34e",
  "parents": [
    "14ebc3f86b3b642d319b33c4bfc4525be2649710"
  ],
  "author": {
    "name": "Sebastian Andrzej Siewior",
    "email": "bigeasy@linutronix.de",
    "time": "Fri Jun 23 16:19:54 2017 +0200"
  },
  "committer": {
    "name": "Sebastian Andrzej Siewior",
    "email": "bigeasy@linutronix.de",
    "time": "Fri Jun 23 16:19:54 2017 +0200"
  },
  "message": "[ANNOUNCE] v4.9.33-rt23\n\nDear RT folks!\n\nI\u0027m pleased to announce the v4.9.33-rt23 patch set.\n\nChanges since v4.9.33-rt22:\n\n  - A changed CPU mask while a task was in a migrate_disable() section\n    did not run all its scheduler hooks after a migrate_enable(). Also\n    it did not immediatelly switch the CPU if its CPU mask was did not\n    contain the current CPU mask. Noticed while re-doing the migrate\n    disable code for v4.11 and also reported by Daniel Bristot.\n\n  - The removal of TASK_ALL in the last release uncovered a bug where we\n    mixed normal wake ups and wake ups made for waiters of sleeping\n    spinlock. Reported by Mike Galbraith.\n\nKnown issues\n\t- CPU hotplug got a little better but can deadlock.\n\nThe delta patch against v4.9.33-rt22 is appended below and can be found here:\n\n     https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.9/incr/patch-4.9.33-rt22-rt23.patch.xz\n\nYou can get this release via the git tree at:\n\n    git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v4.9.33-rt23\n\nThe RT patch against v4.9.33 can be found here:\n\n    https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patch-4.9.33-rt23.patch.xz\n\nThe split quilt queue is available at:\n\n    https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.33-rt23.tar.xz\n\nSebastian\ndiff --git a/include/linux/sched.h b/include/linux/sched.h\n--- a/include/linux/sched.h\n+++ b/include/linux/sched.h\n@@ -1014,8 +1014,20 @@ struct wake_q_head {\n #define WAKE_Q(name)\t\t\t\t\t\\\n \tstruct wake_q_head name \u003d { WAKE_Q_TAIL, \u0026name.first }\n\n-extern void wake_q_add(struct wake_q_head *head,\n-\t\t\t      struct task_struct *task);\n+extern void __wake_q_add(struct wake_q_head *head,\n+\t\t\t struct task_struct *task, bool sleeper);\n+static inline void wake_q_add(struct wake_q_head *head,\n+\t\t\t      struct task_struct *task)\n+{\n+\t__wake_q_add(head, task, false);\n+}\n+\n+static inline void wake_q_add_sleeper(struct wake_q_head *head,\n+\t\t\t\t      struct task_struct *task)\n+{\n+\t__wake_q_add(head, task, true);\n+}\n+\n extern void __wake_up_q(struct wake_q_head *head, bool sleeper);\n\n static inline void wake_up_q(struct wake_q_head *head)\n@@ -1535,6 +1547,7 @@ struct task_struct {\n \tunsigned int policy;\n #ifdef CONFIG_PREEMPT_RT_FULL\n \tint migrate_disable;\n+\tint migrate_disable_update;\n # ifdef CONFIG_SCHED_DEBUG\n \tint migrate_disable_atomic;\n # endif\n@@ -1745,6 +1758,7 @@ struct task_struct {\n \traw_spinlock_t pi_lock;\n\n \tstruct wake_q_node wake_q;\n+\tstruct wake_q_node wake_q_sleeper;\n\n #ifdef CONFIG_RT_MUTEXES\n \t/* PI waiters blocked on a rt_mutex held by this task */\ndiff --git a/kernel/fork.c b/kernel/fork.c\n--- a/kernel/fork.c\n+++ b/kernel/fork.c\n@@ -558,6 +558,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)\n \ttsk-\u003esplice_pipe \u003d NULL;\n \ttsk-\u003etask_frag.page \u003d NULL;\n \ttsk-\u003ewake_q.next \u003d NULL;\n+\ttsk-\u003ewake_q_sleeper.next \u003d NULL;\n\n \taccount_kernel_stack(tsk, 1);\n\ndiff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c\n--- a/kernel/locking/rtmutex.c\n+++ b/kernel/locking/rtmutex.c\n@@ -1506,7 +1506,7 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q,\n \t */\n \tpreempt_disable();\n \tif (waiter-\u003esavestate)\n-\t\twake_q_add(wake_sleeper_q, waiter-\u003etask);\n+\t\twake_q_add_sleeper(wake_sleeper_q, waiter-\u003etask);\n \telse\n \t\twake_q_add(wake_q, waiter-\u003etask);\n \traw_spin_unlock(\u0026current-\u003epi_lock);\ndiff --git a/kernel/sched/core.c b/kernel/sched/core.c\n--- a/kernel/sched/core.c\n+++ b/kernel/sched/core.c\n@@ -430,9 +430,15 @@ static bool set_nr_if_polling(struct task_struct *p)\n #endif\n #endif\n\n-void wake_q_add(struct wake_q_head *head, struct task_struct *task)\n+void __wake_q_add(struct wake_q_head *head, struct task_struct *task,\n+\t\t  bool sleeper)\n {\n-\tstruct wake_q_node *node \u003d \u0026task-\u003ewake_q;\n+\tstruct wake_q_node *node;\n+\n+\tif (sleeper)\n+\t\tnode \u003d \u0026task-\u003ewake_q_sleeper;\n+\telse\n+\t\tnode \u003d \u0026task-\u003ewake_q;\n\n \t/*\n \t * Atomically grab the task, if -\u003ewake_q is !nil already it means\n@@ -461,11 +467,17 @@ void __wake_up_q(struct wake_q_head *head, bool sleeper)\n \twhile (node !\u003d WAKE_Q_TAIL) {\n \t\tstruct task_struct *task;\n\n-\t\ttask \u003d container_of(node, struct task_struct, wake_q);\n+\t\tif (sleeper)\n+\t\t\ttask \u003d container_of(node, struct task_struct, wake_q_sleeper);\n+\t\telse\n+\t\t\ttask \u003d container_of(node, struct task_struct, wake_q);\n \t\tBUG_ON(!task);\n \t\t/* task can safely be re-inserted now */\n \t\tnode \u003d node-\u003enext;\n-\t\ttask-\u003ewake_q.next \u003d NULL;\n+\t\tif (sleeper)\n+\t\t\ttask-\u003ewake_q_sleeper.next \u003d NULL;\n+\t\telse\n+\t\t\ttask-\u003ewake_q.next \u003d NULL;\n\n \t\t/*\n \t\t * wake_up_process() implies a wmb() to pair with the queueing\n@@ -1138,18 +1150,14 @@ void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_ma\n \tp-\u003enr_cpus_allowed \u003d cpumask_weight(new_mask);\n }\n\n-void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)\n+static void __do_set_cpus_allowed_tail(struct task_struct *p,\n+\t\t\t\t       const struct cpumask *new_mask)\n {\n \tstruct rq *rq \u003d task_rq(p);\n \tbool queued, running;\n\n \tlockdep_assert_held(\u0026p-\u003epi_lock);\n\n-\tif (__migrate_disabled(p)) {\n-\t\tcpumask_copy(\u0026p-\u003ecpus_allowed, new_mask);\n-\t\treturn;\n-\t}\n-\n \tqueued \u003d task_on_rq_queued(p);\n \trunning \u003d task_current(rq, p);\n\n@@ -1172,6 +1180,20 @@ void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)\n \t\tset_curr_task(rq, p);\n }\n\n+void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)\n+{\n+\tif (__migrate_disabled(p)) {\n+\t\tlockdep_assert_held(\u0026p-\u003epi_lock);\n+\n+\t\tcpumask_copy(\u0026p-\u003ecpus_allowed, new_mask);\n+#if defined(CONFIG_PREEMPT_RT_FULL) \u0026\u0026 defined(CONFIG_SMP)\n+\t\tp-\u003emigrate_disable_update \u003d 1;\n+#endif\n+\t\treturn;\n+\t}\n+\t__do_set_cpus_allowed_tail(p, new_mask);\n+}\n+\n static DEFINE_PER_CPU(struct cpumask, sched_cpumasks);\n static DEFINE_MUTEX(sched_down_mutex);\n static cpumask_t sched_down_cpumask;\n@@ -3435,6 +3457,43 @@ void migrate_enable(void)\n \t */\n \tp-\u003emigrate_disable \u003d 0;\n\n+\tif (p-\u003emigrate_disable_update) {\n+\t\tstruct rq *rq;\n+\t\tstruct rq_flags rf;\n+\n+\t\trq \u003d task_rq_lock(p, \u0026rf);\n+\t\tupdate_rq_clock(rq);\n+\n+\t\t__do_set_cpus_allowed_tail(p, \u0026p-\u003ecpus_allowed);\n+\t\ttask_rq_unlock(rq, p, \u0026rf);\n+\n+\t\tp-\u003emigrate_disable_update \u003d 0;\n+\n+\t\tWARN_ON(smp_processor_id() !\u003d task_cpu(p));\n+\t\tif (!cpumask_test_cpu(task_cpu(p), \u0026p-\u003ecpus_allowed)) {\n+\t\t\tconst struct cpumask *cpu_valid_mask \u003d cpu_active_mask;\n+\t\t\tstruct migration_arg arg;\n+\t\t\tunsigned int dest_cpu;\n+\n+\t\t\tif (p-\u003eflags \u0026 PF_KTHREAD) {\n+\t\t\t\t/*\n+\t\t\t\t * Kernel threads are allowed on online \u0026\u0026 !active CPUs\n+\t\t\t\t */\n+\t\t\t\tcpu_valid_mask \u003d cpu_online_mask;\n+\t\t\t}\n+\t\t\tdest_cpu \u003d cpumask_any_and(cpu_valid_mask, \u0026p-\u003ecpus_allowed);\n+\t\t\targ.task \u003d p;\n+\t\t\targ.dest_cpu \u003d dest_cpu;\n+\n+\t\t\tunpin_current_cpu();\n+\t\t\tpreempt_lazy_enable();\n+\t\t\tpreempt_enable();\n+\t\t\tstop_one_cpu(task_cpu(p), migration_cpu_stop, \u0026arg);\n+\t\t\ttlb_migrate_finish(p-\u003emm);\n+\t\t\treturn;\n+\t\t}\n+\t}\n+\n \tunpin_current_cpu();\n \tpreempt_enable();\n \tpreempt_lazy_enable();\ndiff --git a/localversion-rt b/localversion-rt\n--- a/localversion-rt\n+++ b/localversion-rt\n@@ -1 +1 @@\n--rt22\n+-rt23\n\nSigned-off-by: Sebastian Andrzej Siewior \u003cbigeasy@linutronix.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "28b3dc4c64244a08f980613cefa943eba455833e",
      "old_mode": 33188,
      "old_path": "patches/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch",
      "new_id": "92dd57c497df6219ed72833aea01956ea8a33816",
      "new_mode": 33188,
      "new_path": "patches/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch"
    },
    {
      "type": "modify",
      "old_id": "596f6f2cf08ffd0717f3eeb40c930076fd34ae1f",
      "old_mode": 33188,
      "old_path": "patches/arch-arm64-Add-lazy-preempt-support.patch",
      "new_id": "13bcb94c466413405710299f5da29ae04ca9722b",
      "new_mode": 33188,
      "new_path": "patches/arch-arm64-Add-lazy-preempt-support.patch"
    },
    {
      "type": "modify",
      "old_id": "3a7950e615ee69ee4b07e712af65c78b504e0843",
      "old_mode": 33188,
      "old_path": "patches/cgroups-use-simple-wait-in-css_release.patch",
      "new_id": "484bac543a2d21ea90a7429dc7a45a00d1e5eaf2",
      "new_mode": 33188,
      "new_path": "patches/cgroups-use-simple-wait-in-css_release.patch"
    },
    {
      "type": "modify",
      "old_id": "e6e25643a17a43319858ca612fd3305082045576",
      "old_mode": 33188,
      "old_path": "patches/completion-use-simple-wait-queues.patch",
      "new_id": "bf6862bd53f8969df17b8930f42e9c2fcb1cd416",
      "new_mode": 33188,
      "new_path": "patches/completion-use-simple-wait-queues.patch"
    },
    {
      "type": "modify",
      "old_id": "00b2a2b57fcf29ab3645ca934dffafca02456b79",
      "old_mode": 33188,
      "old_path": "patches/cpu-rt-rework-cpu-down.patch",
      "new_id": "745077e6b47befd3938e7a36d56b762ed3133a66",
      "new_mode": 33188,
      "new_path": "patches/cpu-rt-rework-cpu-down.patch"
    },
    {
      "type": "modify",
      "old_id": "c574a092c809e5a8a2c05a873669dcf7127e5d9a",
      "old_mode": 33188,
      "old_path": "patches/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch",
      "new_id": "38a0ece74ccb29cb6b55942383afced8e0d98706",
      "new_mode": 33188,
      "new_path": "patches/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch"
    },
    {
      "type": "modify",
      "old_id": "56d7c4fd20586b71af22148fdc5235d13510c750",
      "old_mode": 33188,
      "old_path": "patches/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch",
      "new_id": "887ced4ee73fc08c603a7d851414c28da1c3c0cd",
      "new_mode": 33188,
      "new_path": "patches/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch"
    },
    {
      "type": "modify",
      "old_id": "898a270e27f0610d6b048d65dbd64940383e4704",
      "old_mode": 33188,
      "old_path": "patches/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch",
      "new_id": "197250dd512e35fff231e9f5365a5d67f3dcfa64",
      "new_mode": 33188,
      "new_path": "patches/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ce4353df8b2a68eb1ec55ac485fbde658dcb907c",
      "new_mode": 33188,
      "new_path": "patches/kernel-locking-use-an-exclusive-wait_q-for-sleeper.patch"
    },
    {
      "type": "modify",
      "old_id": "1b76c9e42e6f271ecad638f77e0ed785a0fb3f36",
      "old_mode": 33188,
      "old_path": "patches/localversion.patch",
      "new_id": "cad0c1aa7aa97349bc9759080c7cdb9c0245bd72",
      "new_mode": 33188,
      "new_path": "patches/localversion.patch"
    },
    {
      "type": "modify",
      "old_id": "817ae137493c531668a8d5ee3bd19947fbfa33db",
      "old_mode": 33188,
      "old_path": "patches/mm-convert-swap-to-percpu-locked.patch",
      "new_id": "835824e89a0e64cfcb712f053d5d192e0374ed29",
      "new_mode": 33188,
      "new_path": "patches/mm-convert-swap-to-percpu-locked.patch"
    },
    {
      "type": "modify",
      "old_id": "f8d47f2f97a60e4eff6b296db4b244c8840cc49a",
      "old_mode": 33188,
      "old_path": "patches/mm-enable-slub.patch",
      "new_id": "16520a20ccf305412cbbc4ca687631e65226d106",
      "new_mode": 33188,
      "new_path": "patches/mm-enable-slub.patch"
    },
    {
      "type": "modify",
      "old_id": "ec723b03314a0f7ad9fa304af4af53a0a944eace",
      "old_mode": 33188,
      "old_path": "patches/mm-page_alloc-reduce-lock-sections-further.patch",
      "new_id": "c8668b92d904ede06a63662918c8a267a5ff98cc",
      "new_mode": 33188,
      "new_path": "patches/mm-page_alloc-reduce-lock-sections-further.patch"
    },
    {
      "type": "modify",
      "old_id": "7f9bca2c23a3b7611d124599a7e8b07bf6ead362",
      "old_mode": 33188,
      "old_path": "patches/mm-page_alloc-rt-friendly-per-cpu-pages.patch",
      "new_id": "e3e7f20a2b525b5aad94ba6f739c207f11328a4b",
      "new_mode": 33188,
      "new_path": "patches/mm-page_alloc-rt-friendly-per-cpu-pages.patch"
    },
    {
      "type": "modify",
      "old_id": "0b521f4b9a92dabc12eae4c203beaf237130550e",
      "old_mode": 33188,
      "old_path": "patches/mm-rt-kmap-atomic-scheduling.patch",
      "new_id": "b2c79594cd753beb69b0354eb2b19d1e596211c6",
      "new_mode": 33188,
      "new_path": "patches/mm-rt-kmap-atomic-scheduling.patch"
    },
    {
      "type": "modify",
      "old_id": "6c6125c6d2aff28c09b9d7fe8919b540d7676be1",
      "old_mode": 33188,
      "old_path": "patches/net-move-xmit_recursion-to-per-task-variable-on-RT.patch",
      "new_id": "cf9725637c585d12be27f80648cef3b33765e66b",
      "new_mode": 33188,
      "new_path": "patches/net-move-xmit_recursion-to-per-task-variable-on-RT.patch"
    },
    {
      "type": "modify",
      "old_id": "87ae1b25f18f0e1cb580906c0e28bde157fbcd82",
      "old_mode": 33188,
      "old_path": "patches/net-prevent-abba-deadlock.patch",
      "new_id": "d5ea19d0822a8b7e5d76b7914b326ecda8e7f0ce",
      "new_mode": 33188,
      "new_path": "patches/net-prevent-abba-deadlock.patch"
    },
    {
      "type": "modify",
      "old_id": "038bfcd4098a11020aea435693f8fad41028e8f1",
      "old_mode": 33188,
      "old_path": "patches/perf-make-swevent-hrtimer-irqsafe.patch",
      "new_id": "29fc8a5e1da3e7bbab78fa627641b8d505a3be9e",
      "new_mode": 33188,
      "new_path": "patches/perf-make-swevent-hrtimer-irqsafe.patch"
    },
    {
      "type": "modify",
      "old_id": "131245a37735a8b65ab4d9b22e2b55ded4143a3f",
      "old_mode": 33188,
      "old_path": "patches/preempt-lazy-support.patch",
      "new_id": "60614b20014f697ef3a6279dd4f454ada6abd751",
      "new_mode": 33188,
      "new_path": "patches/preempt-lazy-support.patch"
    },
    {
      "type": "modify",
      "old_id": "dd83349b49d15b0fcf96387f3fd5a47822cc4b0f",
      "old_mode": 33188,
      "old_path": "patches/ptrace-fix-ptrace-vs-tasklist_lock-race.patch",
      "new_id": "ffae873107cb5d8f08893caa16ea7fc7a120890f",
      "new_mode": 33188,
      "new_path": "patches/ptrace-fix-ptrace-vs-tasklist_lock-race.patch"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5c916df553d7b105a86eab465cda1d09e9c237ff",
      "new_mode": 33188,
      "new_path": "patches/sched-migrate-disable-handle-updated-task-mask-mg-di.patch"
    },
    {
      "type": "modify",
      "old_id": "9b97b8277e66c3f093914603c149680caded2c2f",
      "old_mode": 33188,
      "old_path": "patches/seqlock-prevent-rt-starvation.patch",
      "new_id": "878c7f6f2dd2b2842ec234cfc7167bd13da86e87",
      "new_mode": 33188,
      "new_path": "patches/seqlock-prevent-rt-starvation.patch"
    },
    {
      "type": "modify",
      "old_id": "601935aca5cc306888b4e392b3227cadbfcadeb5",
      "old_mode": 33188,
      "old_path": "patches/series",
      "new_id": "586b6296b0fd861f15febc0d796761bcbce4ef0e",
      "new_mode": 33188,
      "new_path": "patches/series"
    },
    {
      "type": "modify",
      "old_id": "b5ad49cc34c8f0fe1a49822592adc89546db098c",
      "old_mode": 33188,
      "old_path": "patches/skbufhead-raw-lock.patch",
      "new_id": "c486923df58a636033182418b7189a9ce4a5bb09",
      "new_mode": 33188,
      "new_path": "patches/skbufhead-raw-lock.patch"
    },
    {
      "type": "modify",
      "old_id": "b4af19555631ed4dea54cb4a45f3065f5a365de5",
      "old_mode": 33188,
      "old_path": "patches/slub-enable-irqs-for-no-wait.patch",
      "new_id": "2c0ffe2f3a44dc37e46a59ee5788229bec39ffae",
      "new_mode": 33188,
      "new_path": "patches/slub-enable-irqs-for-no-wait.patch"
    },
    {
      "type": "modify",
      "old_id": "ad9e7ee2ba5e01e58a3d2c5a9405e02954ed90b6",
      "old_mode": 33188,
      "old_path": "patches/workqueue-distangle-from-rq-lock.patch",
      "new_id": "46cbdba66a438f5dfb61438f2113aaabea9bd60d",
      "new_mode": 33188,
      "new_path": "patches/workqueue-distangle-from-rq-lock.patch"
    },
    {
      "type": "modify",
      "old_id": "a8e412ee6b2d19652f55924a8816df170b21185a",
      "old_mode": 33188,
      "old_path": "patches/workqueue-prevent-deadlock-stall.patch",
      "new_id": "295aac91de2b99b759966048c48dd8ee887b1c9a",
      "new_mode": 33188,
      "new_path": "patches/workqueue-prevent-deadlock-stall.patch"
    },
    {
      "type": "modify",
      "old_id": "962744968ee72f2dc84c062c2fde292305afff3a",
      "old_mode": 33188,
      "old_path": "patches/x86-mce-timer-hrtimer.patch",
      "new_id": "6bc766fce0805514ea47dca2d454d4b5158244e6",
      "new_mode": 33188,
      "new_path": "patches/x86-mce-timer-hrtimer.patch"
    },
    {
      "type": "modify",
      "old_id": "6a9563ae89f2a95fef39aee5363f475fd87ea735",
      "old_mode": 33188,
      "old_path": "patches/x86-mce-use-swait-queue-for-mce-wakeups.patch",
      "new_id": "ccac7200a012a1b31248096e50f62a2d6855dfe6",
      "new_mode": 33188,
      "new_path": "patches/x86-mce-use-swait-queue-for-mce-wakeups.patch"
    }
  ]
}
