Hello,
On Wed, 1 Jul 2015, Alex Gartrell wrote:
> On Wed, Jul 1, 2015 at 4:26 PM, Eric Dumazet <[email protected]> wrote:
> > I think you are mistaken Alex.
>
> Indeed, I was! Should be unsurpising.
>
> >
> > socket early demux cannot possibly set skb->destructor to sock_rfree()
>
> Yeah I will admit adding the code to sock_rfree reflexively out of paranoia.
>
> > If skb->destructor is set by early demux, it correctly points to
> > sock_edemux()
> >
> > And this one correctly handles all socket variants.
>
> Yes, the problem appears to be in ip_vs_prepare_tunneled_skb
> (ip_vs_xmit.c:859 in 4.0)
>
> if (skb_headroom(skb) < max_headroom || skb_cloned(skb)) {
> new_skb = skb_realloc_headroom(skb, max_headroom);
> if (!new_skb)
> goto error;
> if (skb->sk)
> skb_set_owner_w(new_skb, skb->sk);
> consume_skb(skb);
> skb = new_skb;
> }
>
> skb_set_owner_w sets sock_wfree.
>
> I'll figure out how to ensure that we're using an appropriate destructor here.
Alex, in our discussion on January I thought
we can skip calling skb_orphan for some cases but as
input and output path use different skb->destructor
we should call skb_orphan for every method, in every
case when skb->dev != NULL, even when we do not call
LOCAL_OUT, i.e. when NF_ACCEPT is returned for traffic
to local real server. We should not call it only for
local socket (skb->dev == NULL).
I think, your patch from January is almost
good:
http://archive.linuxvirtualserver.org/html/lvs-devel/2015-01/msg00014.html
Just add skb->dev check and we should be fine.
And the patch from Eric for IPVS looks good too.
Regards
--
Julian Anastasov <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html