linux-stable/include
Jakub Kicinski cbd541c348 rtnetlink: make the "split" NLM_DONE handling generic
[ Upstream commit 5b4b62a169 ]

Jaroslav reports Dell's OMSA Systems Management Data Engine
expects NLM_DONE in a separate recvmsg(), both for rtnl_dump_ifinfo()
and inet_dump_ifaddr(). We already added a similar fix previously in
commit 460b0d33cf ("inet: bring NLM_DONE out to a separate recv() again")

Instead of modifying all the dump handlers, and making them look
different than modern for_each_netdev_dump()-based dump handlers -
put the workaround in rtnetlink code. This will also help us move
the custom rtnl-locking from af_netlink in the future (in net-next).

Note that this change is not touching rtnl_dump_all(). rtnl_dump_all()
is different kettle of fish and a potential problem. We now mix families
in a single recvmsg(), but NLM_DONE is not coalesced.

Tested:

  ./cli.py --dbg-small-recv 4096 --spec netlink/specs/rt_addr.yaml \
           --dump getaddr --json '{"ifa-family": 2}'

  ./cli.py --dbg-small-recv 4096 --spec netlink/specs/rt_route.yaml \
           --dump getroute --json '{"rtm-family": 2}'

  ./cli.py --dbg-small-recv 4096 --spec netlink/specs/rt_link.yaml \
           --dump getlink

Fixes: 3e41af9076 ("rtnetlink: use xarray iterator to implement rtnl_dump_ifinfo()")
Fixes: cdb2f80f1c ("inet: use xa_array iterator to implement inet_dump_ifaddr()")
Reported-by: Jaroslav Pulchart <jaroslav.pulchart@gooddata.com>
Link: https://lore.kernel.org/all/CAK8fFZ7MKoFSEzMBDAOjoUt+vTZRRQgLDNXEOfdCCXSoXXKE0g@mail.gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-21 14:40:06 +02:00
..
acpi ACPI: bus: allow _UID matching for integer zero 2024-04-08 16:57:51 +02:00
asm-generic sched: Add missing memory barrier in switch_mm_cid 2024-04-16 13:59:45 +02:00
clocksource
crypto
drm drm/edid: Parse topology block for all DispID structure v1.x 2024-05-30 09:44:52 +02:00
dt-bindings
keys
kunit
kvm KVM: arm64: Fix host-programmed guest events in nVHE 2024-03-26 01:51:44 -07:00
linux cpufreq: amd-pstate: remove global header file 2024-06-21 14:40:00 +02:00
math-emu
media media: cec: core: avoid recursive cec_claim_log_addrs 2024-06-12 11:39:33 +02:00
memory
misc
net rtnetlink: make the "split" NLM_DONE handling generic 2024-06-21 14:40:06 +02:00
pcmcia
ras
rdma
rv
scsi scsi: sd: Fix TCG OPAL unlock on system resume 2024-03-25 15:46:12 -04:00
soc soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request 2024-06-16 13:50:56 +02:00
sound ASoC: tas2781: Fix wrong loading calibrated data sequence 2024-06-12 11:39:39 +02:00
target
trace ASoC: tracing: Export SND_SOC_DAPM_DIR_OUT to its value 2024-05-30 09:44:49 +02:00
uapi drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations 2024-06-12 11:39:36 +02:00
ufs
vdso vdso: Use CONFIG_PAGE_SHIFT in vdso/datapage.h 2024-04-03 21:50:04 +02:00
video
xen