Thanks a lot for reviewing. It'd be nice to get this in soon as it can
happen easily on systems with lots of interfaces.
Here it's a reproducer:
$ sudo unshare -n
# cat create-links.sh
#!/bin/bash
for i in {1..512}; do ifname="dum$i"; ip li add $ifname type dummy; ip
li set $ifname up; done
# ./create-links.sh
# cat loop-add-del-link.sh
#!/bin/bash
while :; do ifname="test$RANDOM"; ip li add $ifname type dummy; ip li
set $ifname up; sleep 0.1; ip li del $ifname; done
# ./loop-add-del-link.sh &
[1] 6260
# ./loop-add-del-link.sh &
[2] 6314
# ./loop-add-del-link.sh &
[3] 6374
# ./loop-add-del-link.sh &
[4] 6476
# ./loop-add-del-link.sh &
[5] 6628
# cat dalvarez-tester.c
#include <sys/types.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>