Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Manfred Spraul
Alan Cox wrote: > > > Do you really prefer if drivers contain a > > > > static inline void* safe_kmalloc(size, flags) > > { > > if(size > LIMIT) > > return NULL; > > return kmalloc(size, flags); > > } > > It isnt that simple. Look at af_unix.c for example. It needs to k

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Alan Cox
> Do you really prefer if drivers contain a > > static inline void* safe_kmalloc(size, flags) > { > if(size > LIMIT) > return NULL; > return kmalloc(size, flags); > } It isnt that simple. Look at af_unix.c for example. It needs to know the maximum safe request size to

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Manfred Spraul
Alan Cox wrote: > > > > Would it be costly/reasonable to have kmalloc -not- panic if given a > > > too-large size? Principle of Least Surprises says it should return NULL > > > at the very least. > > > > It's on purpose; to find the erroneous drivers. > > Unfortunately Linus forgot to provide a

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Alan Cox
> > printk a message and fail the call. Don't panic. > > Perhaps add a compile time warning, similar to __bad_udelay(); > The BUG is a bad idea. They are all dynamic allocations - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTE

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Alan Cox
> > Would it be costly/reasonable to have kmalloc -not- panic if given a > > too-large size? Principle of Least Surprises says it should return NULL > > at the very least. > > It's on purpose; to find the erroneous drivers. Unfortunately Linus forgot to provide a way to check if a kmalloc is to

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Manfred Spraul
Jeff Garzik wrote: > > > printk a message and fail the call. Don't panic. > Perhaps add a compile time warning, similar to __bad_udelay(); The BUG is a bad idea. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL P

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Jeff Garzik
David Weinehall wrote: > > On Sun, Feb 11, 2001 at 02:59:13PM -0500, Jeff Garzik wrote: > > Alan Cox wrote: > > > > > > > 2.4.2-pre3 doesn't compile with 6pack as a module; I had to disable it; > > > > now it compiles (and so far, works fine). > > > > > > It has a slight dependancy on -ac right n

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread David Weinehall
On Sun, Feb 11, 2001 at 02:59:13PM -0500, Jeff Garzik wrote: > Alan Cox wrote: > > > > > 2.4.2-pre3 doesn't compile with 6pack as a module; I had to disable it; > > > now it compiles (and so far, works fine). > > > > It has a slight dependancy on -ac right now. > > > > KMALLOC_MAXSIZE is the al

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Jeff Garzik
Alan Cox wrote: > > > 2.4.2-pre3 doesn't compile with 6pack as a module; I had to disable it; > > now it compiles (and so far, works fine). > > It has a slight dependancy on -ac right now. > > KMALLOC_MAXSIZE is the alloc size limit - 131072. It checks this as kmalloc > now panics if called wit

Re: 2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Alan Cox
> 2.4.2-pre3 doesn't compile with 6pack as a module; I had to disable it; > now it compiles (and so far, works fine). It has a slight dependancy on -ac right now. KMALLOC_MAXSIZE is the alloc size limit - 131072. It checks this as kmalloc now panics if called with an oversize request - To unsu

2.4.2-pre3 compile error in 6pack.c

2001-02-11 Thread Nick Urbanik
Dear folks, 2.4.2-pre3 doesn't compile with 6pack as a module; I had to disable it; now it compiles (and so far, works fine). kgcc -D__KERNEL__ -I/home/nicku/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -march=i686 -DMODULE -DMODVERSIONS -include /h