Re: 2.6.6-rc3: modular DVB tda1004x broken

Andrew Morton
2004-05-01T23:34:54Z

Andi Kleen <ak@muc.de> wrote:
>
> > diff -puN include/asm-i386/unistd.h~a include/asm-i386/unistd.h
> > --- 25/include/asm-i386/unistd.h~a 2004-05-01 16:09:35.115389384 -0700
> > +++ 25-akpm/include/asm-i386/unistd.h 2004-05-01 16:09:49.513200584 -0700
> > @@ -295,10 +295,6 @@
> >
> > #define __syscall_return(type, res) \
> > do { \
> > - if ((unsigned long)(res) >= (unsigned long)(-125)) { \
> > - errno = -(res); \
> > - res = -1; \
> > - } \
> > return (type) (res); \
> > } while (0)
>
> Don't do that please. That will break all the user space
> programs who use asm/unistd.h to define own system calls
> (it is quite common).
>
> Make it conditional on __KERNEL__

err, that was just a "technology demonstration". Obviously there's a lot
more involved. Such as fixing up all the other architectures and then
killing off all the `errno' users.