From: Patrick McHardy <kaber@trash.net>
To: James Morris <jmorris@namei.org>
Cc: Akinobu Mita <mita@miraclelinux.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
David Miller <davem@davemloft.net>,
akpm@osdl.org
Subject: Re: call panic if nl_table allocation fails
Date: Wed, 23 Aug 2006 16:17:04 +0200 [thread overview]
Message-ID: <44EC6360.9070109@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0608231003340.3198@d.namei>
James Morris wrote:
> On Wed, 23 Aug 2006, Akinobu Mita wrote:
>
>
>>This patch makes crash happen if initialization of nl_table fails
>>in initcalls. It is better than getting use after free crash later.
>
>
>> nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
>
>
> Perhaps it'd be better to declare this as an array rather than allocating
> it at runtime.
That would still leave the MAX_LINKS allocations for the pid hashes
which need to be allocated because they are dynamically sized. We
could delay the pid hash allocations until the first bind happens
of course, but I doubt it would be worth it since they start with
just a single bucket.
next prev parent reply other threads:[~2006-08-23 14:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-23 11:37 call panic if nl_table allocation fails Akinobu Mita
2006-08-23 14:06 ` James Morris
2006-08-23 14:17 ` Patrick McHardy [this message]
2006-08-29 9:15 ` David Miller
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=44EC6360.9070109@trash.net \
--to=kaber@trash.net \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mita@miraclelinux.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).