From owner-freebsd-net@FreeBSD.ORG Tue Mar 27 21:40:10 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B94BC106564A for ; Tue, 27 Mar 2012 21:40:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A05168FC1C for ; Tue, 27 Mar 2012 21:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2RLeAr5076789 for ; Tue, 27 Mar 2012 21:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2RLeAeg076788; Tue, 27 Mar 2012 21:40:10 GMT (envelope-from gnats) Date: Tue, 27 Mar 2012 21:40:10 GMT Message-Id: <201203272140.q2RLeAeg076788@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Ryan Stone Cc: Subject: Re: kern/165863 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ryan Stone List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 21:40:10 -0000 The following reply was made to PR kern/165863; it has been noted by GNATS. From: Ryan Stone To: Eric van Gyzen Cc: Gleb Smirnoff , Eric van Gyzen , emaste@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/165863 Date: Tue, 27 Mar 2012 17:24:37 -0400 2012/3/9 Eric van Gyzen : > On 03/09/12 03:20, Gleb Smirnoff wrote: >> >> =A0 Hello, Eric and Ed. >> >> =A0 Can you look at this patch? I decided to utilize newer callout API, >> that allows to delegate lock retrieval to the callout subsystem, and >> this makes things simplier. Hope that should work. >> >> =A0 Patch is against head. > > > Doesn't arptimer() still need to acquire the if_afdata_lock in order to f= ree > the entry in the normal case (when the llentry is still in the hash bucke= t > list)? Oops, on reviewing the code I believe that this is correct. My test case wouldn't have had arp entries timing out so I wouldn't have hit this case. I'll try to come up with a test case for this. Unfortunately it's not as quite as simple just acquiring if_afdata_lock because of lock ordering problems. I think that we'll have to revert the usage of callout_init_rw so that arptimer can acquire the if_afdata_lock before acquiring the lock LLE_LOCK.