Re: making kmalloc BUG() might not be a good idea

From: Ingo Oeser
Date: Fri Sep 23 2005 - 02:10:32 EST


Hi,

On Friday 23 September 2005 08:30, Nick Piggin wrote:
> David S. Miller wrote:
> >I'm sort-of concerned about this change:
> >
> > [PATCH] __kmalloc: Generate BUG if size requested is too large.
> >
> >it opens a can of worms, and stuff that used to generate
> >-ENOMEM kinds of failures will now BUG() the kernel.
> Making it WARN might be a good compromise.

Which has the potential to spam the logs with a user triggerable event
without even killing the responsible process.
Same problem, just worse.

I could live with a solution that enables it based on a config.

KERNEL_HACKING is no such config. That feature is almost always
enabled, because MAGIC_SYSRQ depends on it and a significant amount
of Linux-Admins like it for a "sync, remount ro and reboot" sequence.
So you need a new one.


Regards

Ingo Oeser


Attachment: pgp00000.pgp
Description: PGP signature