Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Eric Lammerts
On Sun, 24 Jun 2001, Rasmus Andersen wrote: > On Sun, Jun 24, 2001 at 10:52:31PM +0200, Eric Lammerts wrote: > [...] > > There are zillions of functions called 'init_module' in the kernel. > > I think my suggestion was better (and it had a \n at the end!) > > Agreed. Actually, 'ouch' on point

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Rasmus Andersen
On Sun, Jun 24, 2001 at 10:52:31PM +0200, Eric Lammerts wrote: [...] > There are zillions of functions called 'init_module' in the kernel. > I think my suggestion was better (and it had a \n at the end!) Agreed. Actually, 'ouch' on point two :) BTW, was it intentional that you dropped the

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Eric Lammerts
On Sun, 24 Jun 2001, Rasmus Andersen wrote: > Excellent suggestion. How about this one: > +if (!b) { > + printk(" -- aborting.\n"); > + printk(KERN_ERR __FUNCTION__ ": Out of memory."); > + return; > +} There are zillions of functions called 'init_module' in the

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Rasmus Andersen
On Sat, Jun 23, 2001 at 02:30:06PM -0300, Arnaldo Carvalho de Melo wrote: [...] > printk(KERN_ERR __FUNCTION__ "Out of memory."); > > Then if you move the code to other function or if you change the name of > the function you don't have to go all over the code doing >

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Rasmus Andersen
On Sat, Jun 23, 2001 at 02:30:06PM -0300, Arnaldo Carvalho de Melo wrote: [...] printk(KERN_ERR __FUNCTION__ Out of memory.); Then if you move the code to other function or if you change the name of the function you don't have to go all over the code doing

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Eric Lammerts
On Sun, 24 Jun 2001, Rasmus Andersen wrote: Excellent suggestion. How about this one: +if (!b) { + printk( -- aborting.\n); + printk(KERN_ERR __FUNCTION__ : Out of memory.); + return; +} There are zillions of functions called 'init_module' in the kernel. I

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Rasmus Andersen
On Sun, Jun 24, 2001 at 10:52:31PM +0200, Eric Lammerts wrote: [...] There are zillions of functions called 'init_module' in the kernel. I think my suggestion was better (and it had a \n at the end!) Agreed. Actually, 'ouch' on point two :) BTW, was it intentional that you dropped the

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-24 Thread Eric Lammerts
On Sun, 24 Jun 2001, Rasmus Andersen wrote: On Sun, Jun 24, 2001 at 10:52:31PM +0200, Eric Lammerts wrote: [...] There are zillions of functions called 'init_module' in the kernel. I think my suggestion was better (and it had a \n at the end!) Agreed. Actually, 'ouch' on point two :)

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-23 Thread Arnaldo Carvalho de Melo
Em Sat, Jun 23, 2001 at 07:09:37PM +0200, Eric Lammerts escreveu: > > On Sat, 23 Jun 2001, Rasmus Andersen wrote: > > > +if (!b) { > > + printk(" -- aborting.\n"); > > + printk(KERN_ERR "Out of memory."); > > + return; > > +} > > Why not printk(KERN_ERR "rsrc_mgr: Out of

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-23 Thread Eric Lammerts
On Sat, 23 Jun 2001, Rasmus Andersen wrote: > +if (!b) { > + printk(" -- aborting.\n"); > + printk(KERN_ERR "Out of memory."); > + return; > +} Why not printk(KERN_ERR "rsrc_mgr: Out of memory.\n"); ? Then at least people will know what it was that ran out of memory. Eric

[PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-23 Thread Rasmus Andersen
Hi. The patch below adds a kmalloc check to drivers/pcmcmia/rsrc_mgr.c. Against 245-ac16 but aplies to 256p6 also. Reported a while back by the stanford team. --- linux-245-ac16-clean/drivers/pcmcia/rsrc_mgr.c Sat May 19 20:59:21 2001 +++ linux-245-ac16/drivers/pcmcia/rsrc_mgr.cSat

[PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-23 Thread Rasmus Andersen
Hi. The patch below adds a kmalloc check to drivers/pcmcmia/rsrc_mgr.c. Against 245-ac16 but aplies to 256p6 also. Reported a while back by the stanford team. --- linux-245-ac16-clean/drivers/pcmcia/rsrc_mgr.c Sat May 19 20:59:21 2001 +++ linux-245-ac16/drivers/pcmcia/rsrc_mgr.cSat

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-23 Thread Eric Lammerts
On Sat, 23 Jun 2001, Rasmus Andersen wrote: +if (!b) { + printk( -- aborting.\n); + printk(KERN_ERR Out of memory.); + return; +} Why not printk(KERN_ERR rsrc_mgr: Out of memory.\n); ? Then at least people will know what it was that ran out of memory. Eric - To

Re: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)

2001-06-23 Thread Arnaldo Carvalho de Melo
Em Sat, Jun 23, 2001 at 07:09:37PM +0200, Eric Lammerts escreveu: On Sat, 23 Jun 2001, Rasmus Andersen wrote: +if (!b) { + printk( -- aborting.\n); + printk(KERN_ERR Out of memory.); + return; +} Why not printk(KERN_ERR rsrc_mgr: Out of memory.\n); ? Then at least