f6eee53beb
[ Upstream commit 21b52fed928e96d2f75d2f6aa9eac7a4b0b55d22 ]
rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into
multiple netlink skbs if the buffer provided by user space is too small
(one buffer will typically handle a few hundred FDB entries).
When the current buffer becomes full, nlmsg_put() in
dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index
of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that
point, and then the dump resumes on the same port with a new skb, and
FDB entries up to the saved index are simply skipped.
Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to
drivers, then drivers must check for the -EMSGSIZE error code returned
by it. Otherwise, when a netlink skb becomes full, DSA will no longer
save newly dumped FDB entries to it, but the driver will continue
dumping. So FDB entries will be missing from the dump.
Fix the broken backpressure by propagating the "cb" return code and
allow rtnl_fdb_dump() to restart the FDB dump with a new skb.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
sja1105_clocking.c | ||
sja1105_dynamic_config.c | ||
sja1105_dynamic_config.h | ||
sja1105_ethtool.c | ||
sja1105_main.c | ||
sja1105_ptp.c | ||
sja1105_ptp.h | ||
sja1105_spi.c | ||
sja1105_static_config.c | ||
sja1105_static_config.h | ||
sja1105_tas.c | ||
sja1105_tas.h | ||
sja1105.h |