From: Bernd Petrovitsch <bernd@firmix.at>
To: Paul Jackson <pj@sgi.com>
Cc: Andrew Morton <akpm@osdl.org>,
dtor_core@ameritech.net, linux-kernel@vger.kernel.org,
penberg@cs.helsinki.fi, jirislaby@gmail.com,
lion.vollnhals@web.de
Subject: Re: [PATCH] use kzalloc instead of malloc+memset
Date: Wed, 14 Sep 2005 11:33:53 +0200 [thread overview]
Message-ID: <1126690433.11423.9.camel@tara.firmix.at> (raw)
In-Reply-To: <20050913162851.7467b52d.pj@sgi.com>
On Tue, 2005-09-13 at 16:28 -0700, Paul Jackson wrote:
> Andrew wrote:
> > It hurts readability. Quick question: is this code correct?
> >
> > dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
>
> And it hurts maintainability. If someone changes 'dev' so
> that it is no longer of type 'struct net_device', then they
'struct net_device *'
> risk missing this allocation, and introducing what could be
> a nasty memory corruption kernel bug.
SCNR,
Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services
prev parent reply other threads:[~2005-09-14 9:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-12 22:10 Lion Vollnhals
2005-09-12 22:47 ` Lion Vollnhals
2005-09-13 5:41 ` Denis Vlasenko
2005-09-13 11:27 ` Jiri Slaby
2005-09-12 22:58 ` Jiri Slaby
2005-09-13 4:43 ` Pekka Enberg
2005-09-13 5:33 ` Dmitry Torokhov
2005-09-13 6:42 ` Andrew Morton
2005-09-13 7:02 ` Pekka J Enberg
2005-09-13 7:42 ` Nikita Danilov
2005-09-13 16:31 ` Pekka Enberg
2005-09-14 5:02 ` Denis Vlasenko
2005-09-14 9:58 ` Nikita Danilov
2005-09-13 23:28 ` Paul Jackson
2005-09-14 9:33 ` Bernd Petrovitsch [this message]
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=1126690433.11423.9.camel@tara.firmix.at \
--to=bernd@firmix.at \
--cc=akpm@osdl.org \
--cc=dtor_core@ameritech.net \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lion.vollnhals@web.de \
--cc=penberg@cs.helsinki.fi \
--cc=pj@sgi.com \
/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
all inboxes | Powered by JetHome®