]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: b53: Bound check ARL searches
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 30 Apr 2020 18:49:10 +0000 (11:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 May 2020 00:43:29 +0000 (17:43 -0700)
commite54f05ff29052b5d0acd6a78403fc733a19e1c32
tree3a19a7137124e174efa96796a81c5e55d7335c59
parent5479a0c259b87d584befd07f79f1d0c4d4b326ac
net: dsa: b53: Bound check ARL searches

ARL searches are done by reading two ARL entries at a time, do not cap
the search at 1024 which would only limit us to half of the possible ARL
capacity, but use b53_max_arl_entries() instead which does the right
multiplication between bins and indexes.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/b53/b53_priv.h