Re: [PATCH] slab: Adds missing kmalloc() checks.



Hi,

On Fri, 2006-01-06 at 13:12 -0200, Luiz Fernando Capitulino wrote:
> | > Adds two missing kmalloc() checks in kmem_cache_init(). Note that if the
> | > allocation fails, there is nothing to do, so we panic();

On Fri, 06 Jan 2006 16:24:47 +0100
Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
> | ok so what good does this do? if you die this early.. you are in deeper
> | problems, and can't boot. while this makes the code bigger...

On Fri, 2006-01-06 at 13:30 -0200, Luiz Fernando Capitulino wrote:
> Well, you'll get a panic with a message saying you have no memory to
> boot, instead of a OOPS with a kernel NULL pointer derefecence, which
> will make you look for a bug.

The code is in init section so I don't think size is an issue. A plain
BUG_ON would be better though as it can be disabled by the embedded
folk.

Pekka

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] slab: Adds missing kmalloc() checks.
    ... |> Adds two missing kmalloc() checks in kmem_cache_init. ... |> allocation fails, there is nothing to do, so we panic; ... | problems, and can't boot. ... you'll get a panic with a message saying you have no memory to ...
    (Linux-Kernel)
  • Re: [PATCH] quiet MMCONFIG related printks
    ... Arjan van de Ven wrote: ... boot with the 'quiet' option. ... , yet I get a loud complaint at boot time. ... "They that give up essential liberty to obtain temporary safety, ...
    (Linux-Kernel)
  • Re: USB storage no-boot regression (bisected)
    ... Arjan van de Ven wrote: ... SATA drives also take variable amounts of time to "show up" at boot. ... just a few seconds to compensate for the regression. ... but rather a TIMEOUT. ...
    (Linux-Kernel)
  • Re: Activity with my network icons
    ... i have a similar prob, everytime i boot up my system or disconnected from ... the net i get a message saying a program wants to connect to a dodjie named ...
    (microsoft.public.windowsxp.security_admin)
  • System32NTOSKRNL.EXE missing or corrupt
    ... I have had my Dell computer for about a month. ... message saying that I can't boot up because ... I have worked with Dell to get this resolved without success. ...
    (microsoft.public.windowsxp.help_and_support)