Message ID | 1431587190-28901-1-git-send-email-ying.xue@windriver.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Thu, May 14, 2015 at 09:06:30AM CEST, ying.xue@windriver.com wrote: >Once we get a neighbour through looking up arp cache or creating a >new one in rocker_port_ipv4_resolve(), the neighbour's refcount is >already taken. But we don't put the refcount again after it's used, >which make the neighbour entry leaked. > >Signed-off-by: Ying Xue <ying.xue@windriver.com> Acked-by: Jiri Pirko <jiri@resnulli.us> -- 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
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c index 1fc006b..7504540 100644 --- a/drivers/net/ethernet/rocker/rocker.c +++ b/drivers/net/ethernet/rocker/rocker.c @@ -3053,6 +3053,7 @@ static int rocker_port_ipv4_resolve(struct rocker_port *rocker_port, else neigh_event_send(n, NULL); + neigh_release(n); return err; }
Once we get a neighbour through looking up arp cache or creating a new one in rocker_port_ipv4_resolve(), the neighbour's refcount is already taken. But we don't put the refcount again after it's used, which make the neighbour entry leaked. Signed-off-by: Ying Xue <ying.xue@windriver.com> --- drivers/net/ethernet/rocker/rocker.c | 1 + 1 file changed, 1 insertion(+)