Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Thursday, July 17, 2008 - 7:13 pm

From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 18 Jul 2008 01:52:54 +0200


Maybe.  Every SKB object allocated is fully initialized
in __alloc_skb():

	/*
	 * Only clear those fields we need to clear, not those that we will
	 * actually initialise below. Hence, don't put any more fields after
	 * the tail pointer in struct sk_buff!
	 */
	memset(skb, 0, offsetof(struct sk_buff, tail));

That leaves the following trailing members of struct sk_buff:

	/* These elements must be at the end, see alloc_skb() for details.  */
	sk_buff_data_t		tail;
	sk_buff_data_t		end;
	unsigned char		*head,
				*data;
	unsigned int		truesize;
	atomic_t		users;

which are the explicitly initialized right after the quotes memset().

	skb->truesize = size + sizeof(struct sk_buff);
	atomic_set(&skb->users, 1);
	skb->head = data;
	skb->data = data;
	skb_reset_tail_pointer(skb);
	skb->end = skb->tail + size;

When we clone, there are probably some fields we don't copy over
explicitly.  And we usually do that because they don't matter or
if they do the caller will take care of it.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., David Miller, (Thu Jul 17, 7:13 pm)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Thu Jul 17, 10:46 pm)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Fri Jul 18, 3:16 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Christoph Lameter, (Fri Jul 18, 6:54 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Christoph Lameter, (Fri Jul 18, 6:55 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Christoph Lameter, (Fri Jul 18, 7:48 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Fri Jul 18, 9:07 am)
Re: [bug] Attempt to release alive inet socket f6fac040, Ingo Molnar, (Fri Jul 18, 12:10 pm)
Re: [bug] Attempt to release alive inet socket f6fac040, Ingo Molnar, (Fri Jul 18, 12:55 pm)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Mon Jul 21, 3:06 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Mon Jul 21, 4:25 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Mon Jul 21, 5:57 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Christoph Lameter, (Mon Jul 21, 9:19 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Christoph Lameter, (Mon Jul 21, 9:22 am)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Mon Jul 21, 12:57 pm)
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison ..., Evgeniy Polyakov, (Mon Jul 21, 2:24 pm)