diff options
author | glebius <glebius@FreeBSD.org> | 2012-12-13 11:11:15 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-12-13 11:11:15 +0000 |
commit | 8137816adb03dc4adf599f4790b2f2cecbe5f5b4 (patch) | |
tree | e234b73341b1557dce509188f3ea487c6df2c5fa /sys/net | |
parent | 2d5902ca92bed1978312dee52ee4a8d78fb4046a (diff) | |
download | FreeBSD-src-8137816adb03dc4adf599f4790b2f2cecbe5f5b4.zip FreeBSD-src-8137816adb03dc4adf599f4790b2f2cecbe5f5b4.tar.gz |
Fix problem in r238990. The LLE_LINKED flag should be tested prior to
entering llentry_free(), and in case if we lose the race, we should simply
perform LLE_FREE_LOCKED(). Otherwise, if the race is lost by the thread
performing arptimer(), it will remove two references from the lle instead
of one.
Reported by: Ian FREISLICH <ianf clue.co.za>
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_llatbl.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c index bb49fdd..5812623 100644 --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -109,12 +109,6 @@ llentry_free(struct llentry *lle) IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); LLE_WLOCK_ASSERT(lle); - /* XXX: guard against race with other llentry_free(). */ - if (!(lle->la_flags & LLE_LINKED)) { - LLE_FREE_LOCKED(lle); - return (0); - } - LIST_REMOVE(lle, lle_next); lle->la_flags &= ~(LLE_VALID | LLE_LINKED); |