neighbor: Reset gc_entries counter if new entry is released before insert
Subsystems (2)
PATCH 1/1 neighbor: Reset gc_entries counter if new entry is released before insert
From: David Ahern <[email protected]>
Ian and Alan both reported seeing overflows after upgrades to 5.x kernels:
neighbour: arp_cache: neighbor table overflow!
Alan's mpls script helped get to the bottom of this bug. When a new entry is created the gc_entries counter is bumped in neigh_alloc to check if a new one is allowed to be created. ___neigh_create then searches for an existing entry before inserting the just allocated one. If an entry already exists, the new one is dropped in favor of the existing one. In this case the cleanup path needs to drop the gc_entries counter. There is no memory leak, only a counter leak.
--- net/core/neighbour.c | 2 ++ 1 file changed, 2 insertions(+)
net/core/neighbour.c +2 -0
@@ -663,6 +663,8 @@ static struct neighbour *___neigh_create(struct neigh_table *tbl, out_tbl_unlock:write_unlock_bh (&tbl->lock); out_neigh_release: +if (!exempt_from_gc) +atomic_dec (&tbl->gc_entries);neigh_release (n); goto out; }
Signature · 1 line
2.11.0
Quoted 13 lines · David Ahern
From: David Ahern <[email protected]>
Ian and Alan both reported seeing overflows after upgrades to 5.x kernels:
neighbour:arp_cache: neighbor table overflow!Alan's mpls script helped get to the bottom of this bug. When a new entry is created the
gc_entriescounter is bumped inneigh_allocto check if a new one is allowed to be created.___neigh_createthen searches for an existing entry before inserting the just allocated one. If an entry already exists, the new one is dropped in favor of the existing one. In this case the cleanup path needs to drop thegc_entriescounter. There is no memory leak, only a counter leak.
Quoted 4 lines
Fixes 58956317c8d ("neighbor: Improve garbage collection")Reported-by Ian Kumlien <[email protected]>Reported-by Alan Maguire <[email protected]>Signed-off-by David Ahern <[email protected]>
Quoted 21 lines
--- net/core/neighbour.c | 2 ++ 1 file changed, 2 insertions(+)net/core/neighbour.c +2
-0@@ -663,6 +663,8 @@ static struct neighbour *___neigh_create(struct neigh_table *tbl, out_tbl_unlock:write_unlock_bh (&tbl->lock); out_neigh_release: +if (!exempt_from_gc) +atomic_dec (&tbl->gc_entries);neigh_release (n); goto out; }Signature · 1 line
2.11.0
David Miller
maintainerFrom: David Ahern <[email protected]>
Date: Wed, 1 May 2019 18:08:34 -0700
Quoted 13 lines
From: David Ahern <[email protected]>
Ian and Alan both reported seeing overflows after upgrades to 5.x kernels:
neighbour:arp_cache: neighbor table overflow!Alan's mpls script helped get to the bottom of this bug. When a new entry is created the
gc_entriescounter is bumped inneigh_allocto check if a new one is allowed to be created.___neigh_createthen searches for an existing entry before inserting the just allocated one. If an entry already exists, the new one is dropped in favor of the existing one. In this case the cleanup path needs to drop thegc_entriescounter. There is no memory leak, only a counter leak.
Quoted 4 lines
Fixes 58956317c8d ("neighbor: Improve garbage collection")Reported-by Ian Kumlien <[email protected]>Reported-by Alan Maguire <[email protected]>Signed-off-by David Ahern <[email protected]>
Applied and queued up for -stable.
Hi,
Quoted 16 lines · David Miller
From: David Ahern <[email protected]>
Date: Wed, 1 May 2019 18:08:34 -0700Quoted 13 lines
From: David Ahern <[email protected]>
Ian and Alan both reported seeing overflows after upgrades to 5.x kernels:
neighbour:arp_cache: neighbor table overflow!Alan's mpls script helped get to the bottom of this bug. When a new entry is created the
gc_entriescounter is bumped inneigh_allocto check if a new one is allowed to be created.___neigh_createthen searches for an existing entry before inserting the just allocated one. If an entry already exists, the new one is dropped in favor of the existing one. In this case the cleanup path needs to drop thegc_entriescounter. There is no memory leak, only a counter leak.
Quoted 6 lines
Quoted 4 lines
Fixes 58956317c8d ("neighbor: Improve garbage collection")Reported-by Ian Kumlien <[email protected]>Reported-by Alan Maguire <[email protected]>Signed-off-by David Ahern <[email protected]>Applied and queued up for -stable.
Did this get lost in the shuffle? I see it in mainline, but I don't see it in stable. Folks are encountering it with recent 5.1 kernels in
Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1708717.
Thanks,
Jeremy
Quoted 8 lines · Jeremy Cline
Did this get lost in the shuffle? I see it in mainline, but I don't see it in stable. Folks are encountering it with recent 5.1 kernels in
Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1708717.Thanks,
Jeremy
Still in the queue:
https://patchwork.ozlabs.org/bundle/davem/stable/?series=&submitter=&state=*&q=&archive=
David Miller
maintainerFrom: Jeremy Cline <[email protected]>
Date: Thu, 6 Jun 2019 13:07:29 -0400
Quoted 24 lines
Hi,
Quoted 21 lines · David Miller
From: David Ahern <[email protected]>
Date: Wed, 1 May 2019 18:08:34 -0700Quoted 17 lines
From: David Ahern <[email protected]>
Ian and Alan both reported seeing overflows after upgrades to 5.x kernels:
neighbour:arp_cache: neighbor table overflow!Alan's mpls script helped get to the bottom of this bug. When a new entry is created the
gc_entriescounter is bumped inneigh_allocto check if a new one is allowed to be created.___neigh_createthen searches for an existing entry before inserting the just allocated one. If an entry already exists, the new one is dropped in favor of the existing one. In this case the cleanup path needs to drop thegc_entriescounter. There is no memory leak, only a counter leak.Fixes 58956317c8d ("neighbor: Improve garbage collection")Reported-by Ian Kumlien <[email protected]>Reported-by Alan Maguire <[email protected]>Signed-off-by David Ahern <[email protected]>
Quoted 5 lines
Quoted 1 line
Applied and queued up for -stable.
Did this get lost in the shuffle? I see it in mainline, but I don't see it in stable. Folks are encountering it with recent 5.1 kernels in
Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1708717.
It's there in the -stable queue:
https://patchwork.ozlabs.org/bundle/davem/stable/?series=&submitter=&state=*&q=&archive=
So it will (eventually) get sent.