Message ID | 20090627020403.GB19639@gondor.apana.org.au |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Herbert Xu <herbert@gondor.apana.org.au> Date: Sat, 27 Jun 2009 10:04:03 +0800 > On Fri, Jun 26, 2009 at 12:44:44PM -0700, Andrew Morton wrote: >> >> It's a post-2.6.30 regression which Paul has bisected down to >> >> commit d55d87fdff8252d0e2f7c28c2d443aee17e9d70f >> Author: Herbert Xu <herbert@gondor.apana.org.au> >> AuthorDate: Mon Jun 22 02:25:25 2009 +0000 >> Commit: David S. Miller <davem@davemloft.net> >> CommitDate: Tue Jun 23 16:36:25 2009 -0700 >> >> net: Move rx skb_orphan call to where needed >> >> (thanks for doing the bisection!) > > Doh, I'd forgotten about transparent proxying. > > inet: Call skb_orphan before tproxy activates > > As transparent proxying looks up the socket early and assigns > it to the skb for later processing, we must drop any existing > socket ownership prior to that in order to distinguish between > the case where tproxy is active and where it is not. > > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Applied, thanks Herbert. -- 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
David Miller wrote: > From: Herbert Xu <herbert@gondor.apana.org.au> > Date: Sat, 27 Jun 2009 10:04:03 +0800 > >> On Fri, Jun 26, 2009 at 12:44:44PM -0700, Andrew Morton wrote: >>> It's a post-2.6.30 regression which Paul has bisected down to >>> >>> commit d55d87fdff8252d0e2f7c28c2d443aee17e9d70f >>> Author: Herbert Xu <herbert@gondor.apana.org.au> >>> AuthorDate: Mon Jun 22 02:25:25 2009 +0000 >>> Commit: David S. Miller <davem@davemloft.net> >>> CommitDate: Tue Jun 23 16:36:25 2009 -0700 >>> >>> net: Move rx skb_orphan call to where needed >>> >>> (thanks for doing the bisection!) >> Doh, I'd forgotten about transparent proxying. >> >> inet: Call skb_orphan before tproxy activates >> >> As transparent proxying looks up the socket early and assigns >> it to the skb for later processing, we must drop any existing >> socket ownership prior to that in order to distinguish between >> the case where tproxy is active and where it is not. >> >> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> > > Applied, thanks Herbert. Hi Dave, just a reminder, if you already queued up the original patch for 2.6.30-stable, that this patch has to follow then also. Thanks, Oliver -- 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
From: Oliver Hartkopp <oliver@hartkopp.net> Date: Sat, 27 Jun 2009 18:37:21 +0200 > David Miller wrote: >> From: Herbert Xu <herbert@gondor.apana.org.au> >> Date: Sat, 27 Jun 2009 10:04:03 +0800 >> >>> Doh, I'd forgotten about transparent proxying. >>> >>> inet: Call skb_orphan before tproxy activates ... > just a reminder, if you already queued up the original patch for > 2.6.30-stable, that this patch has to follow then also. Indeed, I know. -- 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
On Fri, Jun 26, 2009 at 07:22:47PM -0700, David Miller wrote: > From: Herbert Xu <herbert@gondor.apana.org.au> > Date: Sat, 27 Jun 2009 10:04:03 +0800 > > inet: Call skb_orphan before tproxy activates > > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> > > Applied, thanks Herbert. Checked. It fixes the problem for me.
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 490ce20..db46b4b 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c @@ -440,6 +440,9 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, /* Remove any debris in the socket control block */ memset(IPCB(skb), 0, sizeof(struct inet_skb_parm)); + /* Must drop socket now because of tproxy. */ + skb_orphan(skb); + return NF_HOOK(PF_INET, NF_INET_PRE_ROUTING, skb, dev, NULL, ip_rcv_finish); diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index c3a07d7..6d6a427 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c @@ -139,6 +139,9 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt rcu_read_unlock(); + /* Must drop socket now because of tproxy. */ + skb_orphan(skb); + return NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, dev, NULL, ip6_rcv_finish); err: