Subject: Re: [PATCHv2 net-next] netlink: allow large data transfers from user-space

From: Pablo Neira Ayuso <[email-masked]>
Date: Mon, 3 Jun 2013 19:41:38 +0200

Hi Eric!

On Mon, Jun 03, 2013 at 10:12:39AM -0700, Eric Dumazet wrote:
> On Mon, 2013-06-03 at 18:39 +0200, Pablo Neira Ayuso wrote:
> 
> > +	if (is_vmalloc_addr(skb->head)) {
> > +		vfree(skb->head);
> > +		skb->data = NULL;
> > +	}
> >  
> 
> You probably meant :
> 
> 	skb->head = NULL;
> 
> Now, cross our fingers we do not skb_orphan() these skb too early :)

skb_release_all checks for skb->data != NULL to release skb->head as
it would have been allocated via kmalloc. This didn't look very
intuitive to me when I hit a panic while testing my patch either.

So unless I'm missing anything, that skb->data is OK with the existing
code we have.

Regards.