Re: [PATCH] ipv6: Fix nexthop refcnt leak when creating ipv6 route info

2020-07-28 Thread David Miller
From: Xiyu Yang Date: Sat, 25 Jul 2020 16:02:18 +0800 > ip6_route_info_create() invokes nexthop_get(), which increases the > refcount of the "nh". > > When ip6_route_info_create() returns, local variable "nh" becomes > invalid, so the refcount should be decreased to keep refcount balanced. > >

Re: [PATCH] ipv6: Fix nexthop refcnt leak when creating ipv6 route info

2020-07-25 Thread David Ahern
On 7/25/20 2:02 AM, Xiyu Yang wrote: > ip6_route_info_create() invokes nexthop_get(), which increases the > refcount of the "nh". > > When ip6_route_info_create() returns, local variable "nh" becomes > invalid, so the refcount should be decreased to keep refcount balanced. I forgot to write the t

[PATCH] ipv6: Fix nexthop refcnt leak when creating ipv6 route info

2020-07-25 Thread Xiyu Yang
ip6_route_info_create() invokes nexthop_get(), which increases the refcount of the "nh". When ip6_route_info_create() returns, local variable "nh" becomes invalid, so the refcount should be decreased to keep refcount balanced. The reference counting issue happens in one exception handling path of