linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@kernel.org>
To: Scott Wood <swood@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Daniel Wagner <wagi@monom.org>
Subject: Re: [PATCH RT 21/23] sched: migrate_enable: Busy loop until the migration request is completed
Date: Tue, 03 Mar 2020 14:39:37 -0600	[thread overview]
Message-ID: <1583267977.12738.53.camel@kernel.org> (raw)
In-Reply-To: <f9e97d7214906f7b34aa587b868071a6f673c69a.camel@redhat.com>

Hi Scott,

On Tue, 2020-03-03 at 13:56 -0600, Scott Wood wrote:
> On Thu, 2020-02-27 at 08:33 -0600, zanussi@kernel.org wrote:
> > From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > 
> > v4.14.170-rt75-rc2 stable review patch.
> > If anyone has any objections, please let me know.
> > 
> > -----------
> > 
> > 
> > [ Upstream commit 140d7f54a5fff02898d2ca9802b39548bf7455f1 ]
> > 
> > If user task changes the CPU affinity mask of a running task it
> > will
> > dispatch migration request if the current CPU is no longer allowed.
> > This
> > might happen shortly before a task enters a migrate_disable()
> > section.
> > Upon leaving the migrate_disable() section, the task will notice
> > that
> > the current CPU is no longer allowed and will will dispatch its own
> > migration request to move it off the current CPU.
> > While invoking __schedule() the first migration request will be
> > processed and the task returns on the "new" CPU with "arg.done =
> > 0". Its
> > own migration request will be processed shortly after and will
> > result in
> > memory corruption if the stack memory, designed for request, was
> > used
> > otherwise in the meantime.
> > 
> > Spin until the migration request has been processed if it was
> > accepted.
> > 
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > Signed-off-by: Tom Zanussi <zanussi@kernel.org>
> > ---
> >  kernel/sched/core.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> As I said in https://marc.info/?l=linux-rt-users&m=158258256415340&w=
> 2 if
> you take thhis you should take the followup 2dcd94b443c5dcbc ("sched:
> migrate_enable: Use per-cpu cpu_stop_work")
> 

Yes, I didn't forget about this, it's just that I can't apply this to
4.14-rt until 4.19-rt does, otherwise it will be seen as a regression
to someone moving from 4.14-rt to 4.19-rt.

I will be keeping my eye out for when that happens and will apply it to
the next backport release at that point.

Thanks for making sure it wasn't missed in any case.

Tom 


> -Scott
> 
> 

  reply	other threads:[~2020-03-03 20:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 14:33 [PATCH RT 00/23] Linux v4.14.170-rt75-rc2 zanussi
2020-02-27 14:33 ` [PATCH RT 01/23] Fix wrong-variable use in irq_set_affinity_notifier zanussi
2020-02-27 14:33 ` [PATCH RT 02/23] i2c: exynos5: Remove IRQF_ONESHOT zanussi
2020-02-27 14:33 ` [PATCH RT 03/23] i2c: hix5hd2: " zanussi
2020-02-27 14:33 ` [PATCH RT 04/23] x86: preempt: Check preemption level before looking at lazy-preempt zanussi
2020-02-27 14:33 ` [PATCH RT 05/23] sched: migrate_dis/enable: Use sleeping_lock…() to annotate sleeping points zanussi
2020-02-27 14:33 ` [PATCH RT 06/23] sched: __set_cpus_allowed_ptr: Check cpus_mask, not cpus_ptr zanussi
2020-02-27 14:33 ` [PATCH RT 07/23] sched: Remove dead __migrate_disabled() check zanussi
2020-02-27 14:33 ` [PATCH RT 08/23] sched: migrate disable: Protect cpus_ptr with lock zanussi
2020-02-27 14:33 ` [PATCH RT 09/23] lib/smp_processor_id: Don't use cpumask_equal() zanussi
2020-02-27 14:33 ` [PATCH RT 10/23] futex: Make the futex_hash_bucket spinlock_t again and bring back its old state zanussi
2020-02-27 14:33 ` [PATCH RT 11/23] locking/rtmutex: Clean ->pi_blocked_on in the error case zanussi
2020-02-27 14:33 ` [PATCH RT 12/23] lib/ubsan: Don't seralize UBSAN report zanussi
2020-02-27 14:33 ` [PATCH RT 13/23] kmemleak: Change the lock of kmemleak_object to raw_spinlock_t zanussi
2020-02-27 14:33 ` [PATCH RT 14/23] Revert "ARM: Initialize split page table locks for vector page" zanussi
2020-02-27 14:33 ` [PATCH RT 15/23] locking: Make spinlock_t and rwlock_t a RCU section on RT zanussi
2020-02-27 14:33 ` [PATCH RT 16/23] sched: migrate_enable: Use select_fallback_rq() zanussi
2020-02-27 14:33 ` [PATCH RT 17/23] sched: Lazy migrate_disable processing zanussi
2020-02-27 14:33 ` [PATCH RT 18/23] sched: migrate_enable: Use stop_one_cpu_nowait() zanussi
2020-02-27 14:33 ` [PATCH RT 19/23] sched/core: migrate_enable() must access takedown_cpu_task on !HOTPLUG_CPU zanussi
2020-02-27 14:33 ` [PATCH RT 20/23] lib/smp_processor_id: Adjust check_preemption_disabled() zanussi
2020-02-27 14:33 ` [PATCH RT 21/23] sched: migrate_enable: Busy loop until the migration request is completed zanussi
2020-03-03 19:56   ` Scott Wood
2020-03-03 20:39     ` Tom Zanussi [this message]
2020-03-03 21:19       ` Scott Wood
2020-03-03 21:54         ` Steven Rostedt
2020-03-05 13:38   ` David Laight
2020-03-05 17:58     ` Tom Zanussi
2020-02-27 14:33 ` [PATCH RT 22/23] sched/deadline: Ensure inactive_timer runs in hardirq context zanussi
2020-02-27 14:33 ` [PATCH RT 23/23] Linux 4.14.170-rt75-rc2 zanussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1583267977.12738.53.camel@kernel.org \
    --to=zanussi@kernel.org \
    --cc=C.Emde@osadl.org \
    --cc=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=swood@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=wagi@monom.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).