All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the ipvs-next tree with the  tree
@ 2015-12-01 19:26 Mark Brown
  2015-12-01 19:55 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2015-12-01 19:26 UTC (permalink / raw)
  To: Simon Horman, Michal Kubecek, Florian Westphal, Pablo Neira Ayuso
  Cc: linux-next, linux-kernel, netdev, Joe Stringer, David Miller

[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]

Hi Simon,

Today's linux-next merge of the ipvs-next tree got a conflict in  between commit 264640fc2c5f4f ("ipv6: distinguish frag queues by device for multicast and link-local packets") from the net tree and commit 029f7f3b8701c ("netfilter: ipv6: nf_defrag: avoid/free clone operations") from the ipvs-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

diff --cc net/ipv6/netfilter/nf_conntrack_reasm.c
index bab4441ed4e4,912bc3afc183..000000000000
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@@ -582,31 -576,19 +577,21 @@@ int nf_ct_frag6_gather(struct net *net
  	}
  
  	if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0)
- 		return skb;
+ 		return -EINVAL;
  
- 	clone = skb_clone(skb, GFP_ATOMIC);
- 	if (clone == NULL) {
- 		pr_debug("Can't clone skb\n");
- 		return skb;
- 	}
- 
- 	NFCT_FRAG6_CB(clone)->orig = skb;
- 
- 	if (!pskb_may_pull(clone, fhoff + sizeof(*fhdr))) {
- 		pr_debug("message is too short.\n");
- 		goto ret_orig;
- 	}
+ 	if (!pskb_may_pull(skb, fhoff + sizeof(*fhdr)))
+ 		return -ENOMEM;
  
- 	skb_set_transport_header(clone, fhoff);
- 	hdr = ipv6_hdr(clone);
- 	fhdr = (struct frag_hdr *)skb_transport_header(clone);
+ 	skb_set_transport_header(skb, fhoff);
+ 	hdr = ipv6_hdr(skb);
+ 	fhdr = (struct frag_hdr *)skb_transport_header(skb);
  
  	fq = fq_find(net, fhdr->identification, user, &hdr->saddr, &hdr->daddr,
 -		     ip6_frag_ecn(hdr));
 -	if (fq == NULL)
 +		     skb->dev ? skb->dev->ifindex : 0, ip6_frag_ecn(hdr));
 +	if (fq == NULL) {
 +		pr_debug("Can't find and can't create new queue\n");
- 		goto ret_orig;
+ 		return -ENOMEM;
 +	}
  
  	spin_lock_bh(&fq->q.lock);
  

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-next: manual merge of the ipvs-next tree with the  tree
  2015-12-01 19:26 linux-next: manual merge of the ipvs-next tree with the tree Mark Brown
@ 2015-12-01 19:55 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-12-01 19:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: Simon Horman, Michal Kubecek, Florian Westphal, linux-next,
	linux-kernel, netdev, Joe Stringer, David Miller

On Tue, Dec 01, 2015 at 07:26:09PM +0000, Mark Brown wrote:
> Hi Simon,
> 
> Today's linux-next merge of the ipvs-next tree got a conflict in
> between commit 264640fc2c5f4f ("ipv6: distinguish frag queues by
> device for multicast and link-local packets") from the net tree and
> commit 029f7f3b8701c ("netfilter: ipv6: nf_defrag: avoid/free clone
> operations") from the ipvs-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

This a clash between Florian's fragmentation work and David's net
tree: https://lkml.org/lkml/2015/11/24/732

I'll be using this here to resolve this conflict here before passing
nf-next updates to David.

Thanks.

> diff --cc net/ipv6/netfilter/nf_conntrack_reasm.c
> index bab4441ed4e4,912bc3afc183..000000000000
> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
> @@@ -582,31 -576,19 +577,21 @@@ int nf_ct_frag6_gather(struct net *net
>   	}
>   
>   	if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0)
> - 		return skb;
> + 		return -EINVAL;
>   
> - 	clone = skb_clone(skb, GFP_ATOMIC);
> - 	if (clone == NULL) {
> - 		pr_debug("Can't clone skb\n");
> - 		return skb;
> - 	}
> - 
> - 	NFCT_FRAG6_CB(clone)->orig = skb;
> - 
> - 	if (!pskb_may_pull(clone, fhoff + sizeof(*fhdr))) {
> - 		pr_debug("message is too short.\n");
> - 		goto ret_orig;
> - 	}
> + 	if (!pskb_may_pull(skb, fhoff + sizeof(*fhdr)))
> + 		return -ENOMEM;
>   
> - 	skb_set_transport_header(clone, fhoff);
> - 	hdr = ipv6_hdr(clone);
> - 	fhdr = (struct frag_hdr *)skb_transport_header(clone);
> + 	skb_set_transport_header(skb, fhoff);
> + 	hdr = ipv6_hdr(skb);
> + 	fhdr = (struct frag_hdr *)skb_transport_header(skb);
>   
>   	fq = fq_find(net, fhdr->identification, user, &hdr->saddr, &hdr->daddr,
>  -		     ip6_frag_ecn(hdr));
>  -	if (fq == NULL)
>  +		     skb->dev ? skb->dev->ifindex : 0, ip6_frag_ecn(hdr));
>  +	if (fq == NULL) {
>  +		pr_debug("Can't find and can't create new queue\n");
> - 		goto ret_orig;
> + 		return -ENOMEM;
>  +	}
>   
>   	spin_lock_bh(&fq->q.lock);
>   



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-01 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-01 19:26 linux-next: manual merge of the ipvs-next tree with the tree Mark Brown
2015-12-01 19:55 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.