[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170814.221945.1039673650891799146.davem@davemloft.net>
Date: Mon, 14 Aug 2017 22:19:45 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: weiwan@...gle.com
Cc: netdev@...r.kernel.org, kafai@...com, dsahern@...il.com
Subject: Re: [PATCH net] ipv6: release rt6->rt6i_idev properly during ifdown
From: Wei Wang <weiwan@...gle.com>
Date: Mon, 14 Aug 2017 10:44:59 -0700
> From: Wei Wang <weiwan@...gle.com>
>
> When a dst is created by addrconf_dst_alloc() for a host route or an
> anycast route, dst->dev points to loopback dev while rt6->rt6i_idev
> points to a real device.
> When the real device goes down, the current cleanup code only checks for
> dst->dev and assumes rt6->rt6i_idev->dev is the same. This causes the
> refcount leak on the real device in the above situation.
> This patch makes sure to always release the refcount taken on
> rt6->rt6i_idev during dst_dev_put().
>
> Fixes: 587fea741134 ("ipv6: mark DST_NOGC and remove the operation of
> dst_free()")
> Reported-by: John Stultz <john.stultz@...aro.org>
> Tested-by: John Stultz <john.stultz@...aro.org>
> Tested-by: Martin KaFai Lau <kafai@...com>
> Signed-off-by: Wei Wang <weiwan@...gle.com>
> Signed-off-by: Martin KaFai Lau <kafai@...com>
Applied, thank you.
Powered by blists - more mailing lists