linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: dl8bcu@dl8bcu.de, peterz@infradead.org, mingo@kernel.org,
	linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 0/1] (Was: [regression] boot failure on alpha, bisected)
Date: Sun, 14 Oct 2012 20:35:39 +0200	[thread overview]
Message-ID: <20121014183539.GA16804@redhat.com> (raw)
In-Reply-To: <20121012221843.GJ2616@ZenIV.linux.org.uk>

On 10/12, Al Viro wrote:
>
> On Fri, Oct 12, 2012 at 06:03:37PM +0200, Oleg Nesterov wrote:
> > On 10/06, Thorsten Kranzkowski wrote:
> > >
> > > After upgrading from v3.5-rc7 to current git my system oopses and locks up
> > > early in the boot sequence.
> >
> > OK, I am sending the patch which I already showed.
> >
> > Perhaps we should only add the warning and local_irq_enable()
> > should go into arch/alpha/kernel/signal.c:do_notify_resume().
> >
> > In any case arch/alpha/ should be fixed imho.
>
> Oleg, could you check current signal.git#for-next?  alpha patches in
> there ought to deal with the do_notify_resume() mess on alpha
> for good, AFAICS.

Yes, thanks Al!

6972d6f25d21e3da58ff1309256c787078405c7f makes my patch unnecessary.
Although, as you pointed out, other architectures can have the same
problem so perhaps at least WARN_ONCE() in task_wrok_run() makes
sense.

But I am just curious,

	+do_work_pending(struct pt_regs *regs, struct switch_stack *sw,
	+		 unsigned long thread_flags,
			 unsigned long r0, unsigned long r19)
	 {
	-	if (thread_info_flags & _TIF_SIGPENDING)
	-		do_signal(regs, sw, r0, r19);
	-
	-	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
	-		clear_thread_flag(TIF_NOTIFY_RESUME);
	-		tracehook_notify_resume(regs);
	-	}
	+	do {
	+		if (thread_flags & _TIF_NEED_RESCHED) {
	+			schedule();
	+		} else {
	+			local_irq_enable();

I think this is fine, schedule() can be called with irqs disabled.
And since this is ret-to-user path we can't have the problems with
sched_submit_work().

Still, any particular reason why this patch doesn't do irq_enable()
at the start of the loop?

	+			if (thread_flags & _TIF_SIGPENDING) {
	+				do_signal(regs, sw, r0, r19);
	+				r0 = 0;
	+			} else {
	+				clear_thread_flag(TIF_NOTIFY_RESUME);
	+				tracehook_notify_resume(regs);

Again, this is fine. But why "else" ? It seems that

			if (thread_flags & _TIF_SIGPENDING) {
				do_signal(regs, r0, r19);
				r0 = 0;
			}

			if (thread_flags & _TIF_NOTIFY_RESUME) {
				clear_thread_flag(TIF_NOTIFY_RESUME);
				tracehook_notify_resume(regs);
			}

makes a bit more sense?

Oleg.


  reply	other threads:[~2012-10-14 18:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-06 20:47 [regression] boot failure on alpha, bisected Thorsten Kranzkowski
2012-10-07 16:55 ` Oleg Nesterov
2012-10-07 17:08   ` Al Viro
2012-10-07 17:33     ` Oleg Nesterov
2012-10-07 19:39       ` Al Viro
2012-10-08 14:14         ` Dialup Jon Norstog
2012-10-08 14:14         ` Dialup Jon Norstog
2012-10-08 18:59         ` Oleg Nesterov
2012-10-07 17:13   ` Oleg Nesterov
2012-10-07 18:04     ` Thorsten Kranzkowski
2012-10-07 19:16       ` Oleg Nesterov
2012-10-07 19:41         ` Thorsten Kranzkowski
2012-10-08 18:59         ` Geert Uytterhoeven
2012-10-08 19:10           ` Oleg Nesterov
2012-10-12 16:03 ` [PATCH 0/1] (Was: [regression] boot failure on alpha, bisected) Oleg Nesterov
2012-10-12 16:03   ` [PATCH 1/1] task_work: Add local_irq_enable() into task_work_run() Oleg Nesterov
2012-10-13  1:09     ` Linus Torvalds
2012-10-13  1:48       ` Al Viro
2012-10-13  9:59       ` Michael Cree
2012-10-13 15:39         ` Al Viro
2012-10-13 13:06       ` Thorsten Kranzkowski
2012-10-12 22:18   ` [PATCH 0/1] (Was: [regression] boot failure on alpha, bisected) Al Viro
2012-10-14 18:35     ` Oleg Nesterov [this message]
2012-10-14 18:42       ` Oleg Nesterov

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=20121014183539.GA16804@redhat.com \
    --to=oleg@redhat.com \
    --cc=dl8bcu@dl8bcu.de \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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).