Subject: Re: [PATCH] Fix slab corruption with netem

From: Guillaume Chazarain <[email-masked]>
Date: Sat, 15 Jul 2006 18:06:16 +0200

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