Skip to content

net: ipv4: fix circular-list infinite loop

Florian Westphal netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: ipv4: fix infinite loop on secondary addr promotionnet/ipv4/devinet.c+2 -10 replies
2/2selftests: rtnetlink: add small test case with 'promote_secondaries' enabledtools/testing/selftests/net/rtnetlink.sh+20 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] net: ipv4: fix circular-list infinite loop

Tariq and Ran reported a regression caused by net-next commit 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list").

This happens when net.ipv4.conf.$dev.promote_secondaries sysctl is enabled -- we can arrange for ifa->next to point at ifa, so next process that tries to walk the list loops forever.

Fix this and extend rtnetlink.sh with a small test case for this.

Florian Westphal (2):
net: ipv4: fix infinite loop on secondary addr promotion
selftests: rtnetlink: add small test case with 'promote_secondaries' enabled

 net/ipv4/devinet.c                       |    3 ++-
 tools/testing/selftests/net/rtnetlink.sh |   20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)