[PATCH 5.15 674/691] net: Fix an unsafe loop on the list