From 783dfdc0750e0aa7b3c0771b854d59576c43e2bf Mon Sep 17 00:00:00 2001 From: ae Date: Sat, 14 Mar 2015 14:35:07 +0000 Subject: [PATCH] MFC r279730: lla_lookup() can directly call llentry_free() for static entries and the last one requires to hold afdata's wlock. PR: 197096 --- sys/netinet/if_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 03d894f6b20d..4ffaee3c8be4 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -153,10 +153,10 @@ arp_ifscrub(struct ifnet *ifp, uint32_t addr) addr4.sin_len = sizeof(addr4); addr4.sin_family = AF_INET; addr4.sin_addr.s_addr = addr; - IF_AFDATA_RLOCK(ifp); + IF_AFDATA_WLOCK(ifp); lla_lookup(LLTABLE(ifp), (LLE_DELETE | LLE_IFADDR), (struct sockaddr *)&addr4); - IF_AFDATA_RUNLOCK(ifp); + IF_AFDATA_WUNLOCK(ifp); } #endif