public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] alpha bug in signal handling
@ 2001-12-05  3:00 Richard Henderson
  0 siblings, 0 replies; only message in thread
From: Richard Henderson @ 2001-12-05  3:00 UTC (permalink / raw)
  To: linux-ia64

On Tue, Dec 04, 2001 at 06:15:50PM -0800, David Mosberger wrote:
> Oh, sorry, I was referring to teh *other* problem... ;-)
> 
> What I meant is that the check for re-scheduling
> (current->need_resched) and signal deliverify (current->sigpending)
> needs to be done with interrupts turned off, and the interrupts need
> to be left off until user space is reached.  Otherwise, you could get
> an interrupt which would wake up a higher priority task or post a
> signal between the check and the return to user space.
> 
> I didn't see this interrupt disabling in the Alpha version of entry.S,
> but I have to admit my Alpha assembly is getting quite rusty.

Oh, yes, I see.  This should fix it.


r~



--- arch/alpha/kernel/entry.S.orig	Tue Dec  4 18:40:53 2001
+++ arch/alpha/kernel/entry.S	Tue Dec  4 18:46:33 2001
@@ -580,6 +580,10 @@
 	and	$0,8,$0
 	beq	$0,restore_all
 ret_from_reschedule:
+	/* Turn off interrupts so that resched and signal delivery
+	   checks are done atomically.  */
+	addq	$31,7,$16
+	call_pal PAL_swpipl
 	ldq	$2,TASK_NEED_RESCHED($8)
 	lda	$4,init_task_union
 	bne	$2,reschedule


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-05  3:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-05  3:00 [Linux-ia64] alpha bug in signal handling Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox