All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: "Patrick R. McManus" <mcmanus@ducksong.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: 2.4.19-pre4-ac4 kills my gdm
Date: Thu, 04 Apr 2002 13:17:57 -0600	[thread overview]
Message-ID: <3CACA6E5.9080005@acm.org> (raw)
In-Reply-To: <20020404142308.GA1177@ducksong.com> <E16t8yO-00068s-00@the-village.bc.nu> <20020404162112.GA1171@ducksong.com>

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

  Patrick R. McManus wrote:

>Alan,
>
>mea culpa on this one - my problem appears to be with the only other
>patch I was running - I believed I was also running it on ac3, but it
>now appears that I was thinking of another box.
>
>The other patch was corey minyard's "allow signal handler to not call
>handler" patch that I was interested in seeing its impact on a
>userspace project of mine. It kills gdm (at least with ac4.. maybe
>others?)
>
>thanks,
>-Pat
>
Yet, it does seem to kill gdm. xdm and kdm seem to work fine.

Ok, I see the problem. I've fixed it, booted and tried gdm, and it works 
fine. The SA_ONESHOT was checked in the wrong place, the handler is set 
in the frame_setup routines, so I have to check and set the handler due 
to the SA_ONESHOT flag after this. The patch is attached.

-Corey



[-- Attachment #2: linux-nocallhndlr.patch --]
[-- Type: text/plain, Size: 1572 bytes --]

--- ./arch/i386/kernel/signal.c.nocallhndlr	Wed Mar 27 10:56:29 2002
+++ ./arch/i386/kernel/signal.c	Thu Apr  4 13:10:30 2002
@@ -558,22 +558,25 @@
 		}
 	}
 
-	/* Set up the stack frame */
-	if (ka->sa.sa_flags & SA_SIGINFO)
-		setup_rt_frame(sig, ka, info, oldset, regs);
-	else
-		setup_frame(sig, ka, oldset, regs);
+	/* Set up the stack frame if we are calling the handler. */
+	if (! (ka->sa.sa_flags & SA_NOCALLHNDLR)) {
+		if (ka->sa.sa_flags & SA_SIGINFO)
+			setup_rt_frame(sig, ka, info, oldset, regs);
+		else
+			setup_frame(sig, ka, oldset, regs);
+
+		if (!(ka->sa.sa_flags & SA_NODEFER)) {
+			spin_lock_irq(&current->sigmask_lock);
+			sigorsets(&current->blocked,&current->blocked,
+				  &ka->sa.sa_mask);
+			sigaddset(&current->blocked,sig);
+			recalc_sigpending(current);
+			spin_unlock_irq(&current->sigmask_lock);
+		}
+	}
 
 	if (ka->sa.sa_flags & SA_ONESHOT)
 		ka->sa.sa_handler = SIG_DFL;
-
-	if (!(ka->sa.sa_flags & SA_NODEFER)) {
-		spin_lock_irq(&current->sigmask_lock);
-		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
-		sigaddset(&current->blocked,sig);
-		recalc_sigpending(current);
-		spin_unlock_irq(&current->sigmask_lock);
-	}
 }
 
 /*
--- ./include/asm-i386/signal.h.nocallhndlr	Wed Mar 27 10:56:12 2002
+++ ./include/asm-i386/signal.h	Thu Apr  4 13:02:07 2002
@@ -91,6 +91,7 @@
 #define SA_RESTART	0x10000000
 #define SA_NODEFER	0x40000000
 #define SA_RESETHAND	0x80000000
+#define SA_NOCALLHNDLR	0x00800000 /* Don't really call the handler. */
 
 #define SA_NOMASK	SA_NODEFER
 #define SA_ONESHOT	SA_RESETHAND

      reply	other threads:[~2002-04-04 19:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-04 14:23 2.4.19-pre4-ac4 kills my gdm Patrick R. McManus
2002-04-04 15:16 ` Alan Cox
2002-04-04 16:21   ` Patrick R. McManus
2002-04-04 19:17     ` Corey Minyard [this message]

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=3CACA6E5.9080005@acm.org \
    --to=minyard@acm.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcmanus@ducksong.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.