From: Stephen Hemminger <shemminger@osdl.org>
To: Guillaume Chazarain <guichaz@yahoo.fr>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] Fix slab corruption with netem
Date: Sat, 15 Jul 2006 16:34:10 -0700 [thread overview]
Message-ID: <44B97B72.5010301@osdl.org> (raw)
In-Reply-To: <44B91278.7010002@yahoo.fr>
Guillaume Chazarain wrote:
> Stephen Hemminger wrote :
>>> - struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb;
>>> + /* We don't fill cb now as skb_unshare() may invalidate it */
>>> + struct netem_skb_cb *cb = NULL;
>>>
>> Would rather leave it unitialized, rather than setting to NULL.
>
> I find that strange. If someone mistakenly uses cb before it is
> initialized it could be hard
> to figure out why some memory is corrupted. But by initializing cb to
> NULL, it will
> always trigger an Oops, so it will be easier to debug in this case.
>
> Cheers.
>
Gcc will complain if variable is used before initialized, and I would
rather see it at compile time than runtime.
prev parent reply other threads:[~2006-07-15 23:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-15 0:39 [PATCH] Fix slab corruption with netem Guillaume Chazarain
2006-07-15 15:49 ` Stephen Hemminger
2006-07-15 16:06 ` Guillaume Chazarain
2006-07-15 23:34 ` Stephen Hemminger [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=44B97B72.5010301@osdl.org \
--to=shemminger@osdl.org \
--cc=guichaz@yahoo.fr \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.