From: Manfred Spraul <manfred@colorfullife.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Weinehall <tao@acc.umu.se>,
Jeff Garzik <jgarzik@mandrakesoft.com>,
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 21:39:10 +0100 [thread overview]
Message-ID: <3A86F86E.524778E2@colorfullife.com> (raw)
In-Reply-To: <E14S38k-0004wM-00@the-village.bc.nu>
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 way to check if a kmalloc is too
> large so the drivers cannot work around it. Dave put an incredibly ugly
> constant assumption in af_unix for this and no doubt more will follow.
>
> So -ac added the constant
>
What about removing the BUG?
I means all drivers should be aware that kmalloc() > 16 kB fail quite
often.
kmalloc() over 128 kB always fail.
Do you really prefer if drivers contain a
static inline void* safe_kmalloc(size, flags)
{
if(size > LIMIT)
return NULL;
return kmalloc(size, flags);
}
--
Manfred
-
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:39 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
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 [this message]
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=3A86F86E.524778E2@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@mandrakesoft.com \
--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