android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Vladimir Oltean f6eee53beb net: dsa: sja1105: fix broken backpressure in .port_fdb_dump
[ 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: 291d1e72b7 ("net: dsa: sja1105: Add support for FDB and MDB management")
Signed-off-by: Vladimir Oltean <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-08-18 08:57:00 +02:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-06-16 11:59:36 +02:00
arcnet
bonding bonding: init notify_work earlier to avoid uninitialized use 2021-06-16 11:59:34 +02:00
caif net: caif: fix memory leak in ldisc_open 2021-06-30 08:47:47 -04:00
can can: hi311x: fix a signedness bug in hi3110_cmd() 2021-08-04 12:27:40 +02:00
dsa net: dsa: sja1105: fix broken backpressure in .port_fdb_dump 2021-08-18 08:57:00 +02:00
ethernet net/mlx5: Fix return value from tracer initialization 2021-08-18 08:56:59 +02:00
fddi net: fddi: fix UAF in fza_probe 2021-07-25 14:35:15 +02:00
fjes fjes: check return value after calling platform_get_resource() 2021-07-19 08:53:10 +02:00
hamradio net: hamradio: fix memory leak in mkiss_close 2021-06-23 14:41:26 +02:00
hippi
hyperv
ieee802154 ieee802154: hwsim: fix GPF in hwsim_new_edge_nl 2021-08-18 08:56:57 +02:00
ipvlan
netdevsim
phy net: phy: micrel: Fix link detection on ksz87xx switch" 2021-08-18 08:56:58 +02:00
plip
ppp ppp: Fix generating ifname when empty IFLA_IFNAME is specified 2021-08-18 08:56:59 +02:00
slip
team
usb net: pegasus: fix uninit-value in get_interrupt_interval 2021-08-12 13:20:58 +02:00
vmxnet3
wan
wimax
wireless virt_wifi: fix error on connect 2021-08-12 13:21:05 +02:00
xen-netback
dummy.c
eql.c
geneve.c net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb 2021-05-14 09:44:31 +02:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c virtio_net: move tx vq operation under tx queue lock 2021-07-20 16:10:50 +02:00
vrf.c vrf: do not push non-ND strict packets with a source LLA through packet taps again 2021-07-14 16:53:31 +02:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-07-14 16:53:31 +02:00
xen-netfront.c