netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guillaume Chazarain <guichaz@yahoo.fr>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] Fix slab corruption with netem
Date: Sat, 15 Jul 2006 18:06:16 +0200	[thread overview]
Message-ID: <44B91278.7010002@yahoo.fr> (raw)
In-Reply-To: <44B90E8C.5090400@osdl.org>

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.

-- 
Guillaume


  reply	other threads:[~2006-07-15 16:05 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 [this message]
2006-07-15 23:34     ` Stephen Hemminger

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=44B91278.7010002@yahoo.fr \
    --to=guichaz@yahoo.fr \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.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).