* [patch net] neigh: fix setting of default gc_* values
@ 2014-02-21 13:52 Jiri Pirko
2014-02-22 5:09 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2014-02-21 13:52 UTC (permalink / raw)
To: netdev; +Cc: davem, gaofeng, hannes, joe, vfalico, ffusco
This patch fixes bug introduced by:
commit 1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca
"neigh: restore old behaviour of default parms values"
The thing is that in neigh_sysctl_register, extra1 and extra2 which were
previously set for NEIGH_VAR_GC_* are overwritten. That leads to
nonsense int limits for gc_* variables. So fix this by not touching
extra* fields for gc_* variables.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
net/core/neighbour.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index b9e9e0d..e1aa0f3 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3046,7 +3046,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
if (!t)
goto err;
- for (i = 0; i < ARRAY_SIZE(t->neigh_vars); i++) {
+ for (i = 0; i < NEIGH_VAR_GC_INTERVAL; i++) {
t->neigh_vars[i].data += (long) p;
t->neigh_vars[i].extra1 = dev;
t->neigh_vars[i].extra2 = p;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch net] neigh: fix setting of default gc_* values
2014-02-21 13:52 [patch net] neigh: fix setting of default gc_* values Jiri Pirko
@ 2014-02-22 5:09 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-02-22 5:09 UTC (permalink / raw)
To: jiri; +Cc: netdev, gaofeng, hannes, joe, vfalico, ffusco
From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 21 Feb 2014 14:52:57 +0100
> This patch fixes bug introduced by:
> commit 1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca
> "neigh: restore old behaviour of default parms values"
>
> The thing is that in neigh_sysctl_register, extra1 and extra2 which were
> previously set for NEIGH_VAR_GC_* are overwritten. That leads to
> nonsense int limits for gc_* variables. So fix this by not touching
> extra* fields for gc_* variables.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Good catch, applied and queued up for -stable.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-22 5:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21 13:52 [patch net] neigh: fix setting of default gc_* values Jiri Pirko
2014-02-22 5:09 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.