From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 16:54:26 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 6CBA6DC5; Tue, 5 Nov 2013 16:54:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 578C02577; Tue, 5 Nov 2013 16:54:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5GsQlr053383; Tue, 5 Nov 2013 16:54:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5GsQbU053382; Tue, 5 Nov 2013 16:54:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311051654.rA5GsQbU053382@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 16:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257710 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 16:54:26 -0000 Author: glebius Date: Tue Nov 5 16:54:25 2013 New Revision: 257710 URL: http://svnweb.freebsd.org/changeset/base/257710 Log: Fix fallout from r257223. Since pf_test_state_icmp() can call pf_icmp_state_lookup() twice, we need to unlock previously found state. Reported & tested by: gavin Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Nov 5 15:57:24 2013 (r257709) +++ head/sys/netpfil/pf/pf.c Tue Nov 5 16:54:25 2013 (r257710) @@ -4607,6 +4607,8 @@ pf_test_state_icmp(struct pf_state **sta if (ret >= 0) { if (ret == PF_DROP && pd->af == AF_INET6 && icmp_dir == PF_OUT) { + if (*state) + PF_STATE_UNLOCK(*state); ret = pf_icmp_state_lookup(&key, pd, state, m, direction, kif, virtual_id, virtual_type, icmp_dir, &iidx, multi); @@ -5058,6 +5060,8 @@ pf_test_state_icmp(struct pf_state **sta if (ret >= 0) { if (ret == PF_DROP && pd->af == AF_INET6 && icmp_dir == PF_OUT) { + if (*state) + PF_STATE_UNLOCK(*state); ret = pf_icmp_state_lookup(&key, pd, state, m, direction, kif, virtual_id, virtual_type,