From owner-svn-src-all@FreeBSD.ORG Sat Feb 8 17:54:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88B5CE1D; Sat, 8 Feb 2014 17:54:54 +0000 (UTC) Received: from mail-qa0-x229.google.com (mail-qa0-x229.google.com [IPv6:2607:f8b0:400d:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0DC861135; Sat, 8 Feb 2014 17:54:53 +0000 (UTC) Received: by mail-qa0-f41.google.com with SMTP id w8so7301887qac.28 for ; Sat, 08 Feb 2014 09:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=yL9gn+NTgrxCx93mC4yKGVSwUzZdTHrN++ZgXjhICc8=; b=Nmk+CbSuPgj5fPtWnArJ6oxCq6/JHZzZyIUVOrzX1xIFuHr63snpcow3Y5IL/sEPYf pDH/6dB2ZusahwasKYNeXXKoERkYuKGXl6zx4WlMJxekDwZoHeRIcsW9KgeY6u0AcJ2j PzBjFwkBm4+VBI2LznIz1MdMC1R5i3CRzqdniw5OwSzbVXWVSHA35JsdHI5UMCiaV0eN TMYs8K3bycbmmpqUMFMLgk3kI+K/hpUQvYzyEh2qFg0PZJCgE4j8S611G5dAm5I4v4Yk nvoN/P/vfBPu8y8/xArOh4DW3Ji1NdrtN6nN76jHgpJnnIGjvkqAjkCF/eytKF+X6P9b mk1Q== MIME-Version: 1.0 X-Received: by 10.224.160.195 with SMTP id o3mr33096898qax.98.1391882092285; Sat, 08 Feb 2014 09:54:52 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Sat, 8 Feb 2014 09:54:52 -0800 (PST) In-Reply-To: <201402080956.s189uRYp013533@svn.freebsd.org> References: <201402080956.s189uRYp013533@svn.freebsd.org> Date: Sat, 8 Feb 2014 09:54:52 -0800 X-Google-Sender-Auth: nC0QhCRrgA3nQbBy0mPQNmkgsUc Message-ID: Subject: Re: svn commit: r261627 - head/sys/net From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Feb 2014 17:54:54 -0000 Yup, it was part of the (never seemingly publicly used) kern_ API to directly add a flowtable entry. -a On 8 February 2014 01:56, Gleb Smirnoff wrote: > Author: glebius > Date: Sat Feb 8 09:56:26 2014 > New Revision: 261627 > URL: http://svnweb.freebsd.org/changeset/base/261627 > > Log: > Remove never set flag FL_OVERWRITE. The only place where > it was checked led to lock/critnest leak. > > Modified: > head/sys/net/flowtable.c > head/sys/net/pfvar.h > > Modified: head/sys/net/flowtable.c > ============================================================================== > --- head/sys/net/flowtable.c Sat Feb 8 09:50:02 2014 (r261626) > +++ head/sys/net/flowtable.c Sat Feb 8 09:56:26 2014 (r261627) > @@ -280,7 +280,6 @@ flowtable_pcpu_unlock(struct flowtable * > #define FL_ENTRY_UNLOCK(table, hash) (table)->ft_unlock((table), (hash)) > > #define FL_STALE (1<<8) > -#define FL_OVERWRITE (1<<10) > > static struct flentry *flowtable_lookup_common(struct flowtable *, > struct sockaddr_storage *, struct sockaddr_storage *, struct mbuf *, int); > @@ -833,8 +832,6 @@ flowtable_insert(struct flowtable *ft, u > FL_ENTRY_UNLOCK(ft, hash); > uma_zfree(ft->ft_zone, newfle); > > - if (flags & FL_OVERWRITE) > - goto skip; > return (EEXIST); > } > /* > > Modified: head/sys/net/pfvar.h > ============================================================================== > --- head/sys/net/pfvar.h Sat Feb 8 09:50:02 2014 (r261626) > +++ head/sys/net/pfvar.h Sat Feb 8 09:56:26 2014 (r261627) > @@ -1580,8 +1580,6 @@ extern struct pf_src_node *pf_find_src_n > extern void pf_unlink_src_node(struct pf_src_node *); > extern void pf_unlink_src_node_locked(struct pf_src_node *); > extern u_int pf_free_src_nodes(struct pf_src_node_list *); > -extern void pf_print_state(struct pf_state *); > -extern void pf_print_flags(u_int8_t); > extern u_int16_t pf_cksum_fixup(u_int16_t, u_int16_t, u_int16_t, > u_int8_t); > > @@ -1744,8 +1742,6 @@ int pf_osfp_get(struct pf_osfp_ioctl *); > int pf_osfp_match(struct pf_osfp_enlist *, pf_osfp_t); > > #ifdef _KERNEL > -void pf_print_host(struct pf_addr *, u_int16_t, u_int8_t); > - > void pf_step_into_anchor(struct pf_anchor_stackframe *, int *, > struct pf_ruleset **, int, struct pf_rule **, > struct pf_rule **, int *);