lkml.org 
[lkml]   [2007]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [uml-devel] [PATCH] UML - Fix irqstack crash
Date
On mercoledì 19 settembre 2007, Andrew Morton wrote:
> On Tue, 18 Sep 2007 19:33:36 -0400

> Jeff Dike <jdike@addtoit.com> wrote:
> > ===================================================================
> > --- linux-2.6.17.orig/arch/um/os-Linux/signal.c 2007-09-09
> > 11:15:37.000000000 -0400 +++
> > linux-2.6.17/arch/um/os-Linux/signal.c 2007-09-18 12:32:40.000000000
> > -0400 @@ -119,7 +119,7 @@ void (*handlers[_NSIG])(int sig, struct
> >
> > void handle_signal(int sig, struct sigcontext *sc)
> > {
> > - unsigned long pending = 0;
> > + unsigned long pending = 1 << sig;

> You want 1UL there.

Yes, indeed - or sign extension on 64bit machines would set to 1 the whole
high-word.

But using long for that mask makes no difference; either int or long long (or
better, either u32 or u64) should be used, given that the used signal range
is the same on 32 and 64bit machines, it should be u32 for normal signals or
u64 if RT-signals are also allowed.
--
"Doh!" (cit.), I've made another mistake!
Paolo Giarrusso, aka Blaisorblade
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2007-09-20 18:05    [W:0.113 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site