Subject: Re: [RFC PATCH v2 1/2] NET: Clone the sk_buff 'iif' field in __skb_clone()

From: David Miller <[email-masked]>
Date: Mon, 07 Jan 2008 21:48:46 -0800 (PST)

From: James Morris <[email-masked]>
Date: Tue, 8 Jan 2008 08:11:11 +1100 (EST)

> On Mon, 7 Jan 2008, Paul Moore wrote:
> 
> > Both NetLabel and SELinux (other LSMs may grow to use it as well) rely on the
> > 'iif' field to determine the receiving network interface of inbound packets.
> > Unfortunately, at present this field is not preserved across a skb clone
> > operation which can lead to garbage values if the cloned skb is sent back
> > through the network stack.  This patch corrects this problem by properly
> > copying the 'iif' field in __skb_clone() and removing the 'iif' field
> > assignment from skb_act_clone() since it is no longer needed.
> > 
> > Also, while we are here, put the assignments in the same order as the offsets
> > to reduce cacheline bounces.
> > 
> > Signed-off-by: Paul Moore <[email-masked]>
> 
> Dave, perhaps this one should pushed to Linus now as a bugfix?

Probably we should, yes.

Ok, that's what I'll do.