From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: David Weinehall <tao@acc.umu.se>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Nick Urbanik <nicku@vtc.edu.hk>,
Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.2-pre3 compile error in 6pack.c
Date: Sun, 11 Feb 2001 15:14:50 -0500 [thread overview]
Message-ID: <3A86F2BA.1B50360C@mandrakesoft.com> (raw)
In-Reply-To: <E14S04y-0004Tb-00@the-village.bc.nu> <3A86EF11.20C17FD8@mandrakesoft.com> <20010211210826.D20267@khan.acc.umu.se>
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 now.
> > >
> > > KMALLOC_MAXSIZE is the alloc size limit - 131072. It checks this as kmalloc
> > > now panics if called with an oversize request
> >
> > 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.
Oh good grief. You will never find all such drivers. Dynamic memory
allocation is by its definition dynamic. Alloc size is often selected
at runtime based on a variety of factors.
printk a message and fail the call. Don't panic.
We have a system in place to notify calls when kmalloc fails -- return
value. Use that, it's what its there for...
Jeff
--
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-02-11 20:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-11 12:37 2.4.2-pre3 compile error in 6pack.c Nick Urbanik
2001-02-11 17:14 ` Alan Cox
2001-02-11 19:59 ` Jeff Garzik
2001-02-11 20:08 ` David Weinehall
2001-02-11 20:14 ` Jeff Garzik [this message]
2001-02-11 20:25 ` Manfred Spraul
2001-02-11 20:33 ` Alan Cox
2001-02-11 20:30 ` Alan Cox
2001-02-11 20:39 ` Manfred Spraul
2001-02-11 20:42 ` Alan Cox
2001-02-11 21:09 ` Manfred Spraul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A86F2BA.1B50360C@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=nicku@vtc.edu.hk \
--cc=tao@acc.umu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox